mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-12 13:28:33 +00:00
Nodes - Inform nodes they are being loaded using the new IsLoading property
This commit is contained in:
parent
14c7940a21
commit
7176aba0d6
@ -39,6 +39,11 @@ public interface INode : INotifyPropertyChanged, IBreakableModel, IPluginFeature
|
||||
/// Gets a boolean indicating whether the node is a default node that connot be removed
|
||||
/// </summary>
|
||||
bool IsDefaultNode { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a boolean indicating whether the node is currently loading, use this to disable pin type changes etc.
|
||||
/// </summary>
|
||||
bool IsLoading { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the X-position of the node
|
||||
|
||||
@ -46,6 +46,7 @@ public class NodeData
|
||||
|
||||
if (entity != null)
|
||||
{
|
||||
node.IsLoading = true;
|
||||
node.X = entity.X;
|
||||
node.Y = entity.Y;
|
||||
try
|
||||
|
||||
@ -206,6 +206,8 @@ public abstract class NodeScript : CorePropertyChanged, INodeScript
|
||||
}
|
||||
|
||||
LoadConnections();
|
||||
foreach (INode node in Nodes)
|
||||
node.IsLoading = false;
|
||||
}
|
||||
|
||||
internal void LoadFromEntity(NodeScriptEntity entity)
|
||||
@ -216,6 +218,7 @@ public abstract class NodeScript : CorePropertyChanged, INodeScript
|
||||
|
||||
private void LoadExistingNode(INode node, NodeEntity nodeEntity)
|
||||
{
|
||||
node.IsLoading = true;
|
||||
node.Id = nodeEntity.Id;
|
||||
node.X = nodeEntity.X;
|
||||
node.Y = nodeEntity.Y;
|
||||
|
||||
@ -92,6 +92,9 @@ public abstract class Node : BreakableModel, INode
|
||||
/// <inheritdoc />
|
||||
public virtual bool IsDefaultNode => false;
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsLoading { get; set; }
|
||||
|
||||
private readonly List<IPin> _pins = new();
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user