mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 11:26:27 +00:00
Scripts - Properly register script with its owner
Scripts UI - Save on close Scripts UI - Dispose script on removal
This commit is contained in:
1 parent
5367027471
commit
a5c13bb543
5 files changed
+28
-1
No files matched your search
@@ -11,6 +11,10 @@ namespace Artemis.Core.ScriptingProviders
|
||||
protected LayerScript(Layer layer, ScriptConfiguration configuration) : base(configuration)
|
||||
{
|
||||
Layer = layer;
|
||||
lock (Layer.Scripts)
|
||||
{
|
||||
Layer.Scripts.Add(this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -11,6 +11,10 @@ namespace Artemis.Core.ScriptingProviders
|
||||
protected ProfileScript(Profile profile, ScriptConfiguration configuration) : base(configuration)
|
||||
{
|
||||
Profile = profile;
|
||||
lock (Profile.Scripts)
|
||||
{
|
||||
Profile.Scripts.Add(this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
protected PropertyScript(ILayerProperty layerProperty, ScriptConfiguration configuration) : base(configuration)
|
||||
{
|
||||
LayerProperty = layerProperty;
|
||||
lock (LayerProperty.Scripts)
|
||||
{
|
||||
LayerProperty.Scripts.Add(this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in new issue
Block a user