mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Profile editor - Fixed new profile elements not always appearing
UI - Fixed all the memory leaks I could find, closing the UI now frees a lot of RAM Noise brush - Decreased memory usage by removing unused 4D noise Layout editor - Fixed device properties not always applying
This commit is contained in:
1 parent
8cd9c8a5f8
commit
dab11cb3e7
25 files changed
+336
-381
No files matched your search
@@ -146,6 +146,8 @@ namespace Artemis.Core.Models.Profile
|
||||
|
||||
child.Parent = this;
|
||||
}
|
||||
|
||||
OnChildAdded();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -164,6 +166,8 @@ namespace Artemis.Core.Models.Profile
|
||||
|
||||
child.Parent = null;
|
||||
}
|
||||
|
||||
OnChildRemoved();
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
@@ -175,5 +179,22 @@ namespace Artemis.Core.Models.Profile
|
||||
/// Applies the profile element's properties to the underlying storage entity
|
||||
/// </summary>
|
||||
internal abstract void ApplyToEntity();
|
||||
|
||||
#region Events
|
||||
|
||||
public event EventHandler ChildAdded;
|
||||
public event EventHandler ChildRemoved;
|
||||
|
||||
protected virtual void OnChildAdded()
|
||||
{
|
||||
ChildAdded?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
protected virtual void OnChildRemoved()
|
||||
{
|
||||
ChildRemoved?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user