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:
SpoinkyNL committed 2020-07-29 00:29:05 +02:00
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
}
}