mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 20:06:33 +00:00
Nodes - Update NoStringEvaluating
Data model node - Take pin creation off of the UI thread
This commit is contained in:
1 parent
c21acf87a7
commit
43b7b8345c
5 files changed
+19
-32
No files matched your search
@@ -2,7 +2,6 @@
|
||||
using Artemis.Core;
|
||||
using Artemis.Storage.Entities.Profile;
|
||||
using Artemis.VisualScripting.Nodes.DataModel.CustomViewModels;
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.VisualScripting.Nodes.DataModel
|
||||
{
|
||||
@@ -52,40 +51,32 @@ namespace Artemis.VisualScripting.Nodes.DataModel
|
||||
|
||||
public void UpdateOutputPin(bool loadConnections)
|
||||
{
|
||||
Execute.OnUIThread(() =>
|
||||
if (Output != null && Output.Type == DataModelPath?.GetPropertyType())
|
||||
return;
|
||||
|
||||
if (Output != null)
|
||||
{
|
||||
if (Output != null && Output.Type == DataModelPath?.GetPropertyType())
|
||||
return;
|
||||
RemovePin(Output);
|
||||
Output = null;
|
||||
}
|
||||
|
||||
if (Output != null)
|
||||
{
|
||||
RemovePin(Output);
|
||||
Output = null;
|
||||
}
|
||||
Type type = DataModelPath?.GetPropertyType();
|
||||
if (type != null)
|
||||
Output = CreateOutputPin(type);
|
||||
|
||||
Type type = DataModelPath?.GetPropertyType();
|
||||
if (type != null)
|
||||
Output = CreateOutputPin(type);
|
||||
|
||||
if (loadConnections && Script is NodeScript nodeScript)
|
||||
nodeScript.LoadConnections();
|
||||
});
|
||||
if (loadConnections && Script is NodeScript nodeScript)
|
||||
nodeScript.LoadConnections();
|
||||
}
|
||||
|
||||
private void DataModelPathOnPathValidated(object sender, EventArgs e)
|
||||
{
|
||||
UpdateOutputPin(true);
|
||||
|
||||
}
|
||||
|
||||
#region IDisposable
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Dispose()
|
||||
{
|
||||
DataModelPath?.Dispose();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user