mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 20:06:33 +00:00
Profile editor - Added unro/redo
Profile editor - Added adding layers and folders
This commit is contained in:
1 parent
34757716aa
commit
736324e45e
40 files changed
+1878
-317
No files matched your search
@@ -137,7 +137,8 @@ namespace Artemis.UI.Screens.ProfileEditor.ProfileTree.TreeItem
|
||||
if (!SupportsChildren)
|
||||
throw new ArtemisUIException("Cannot add a folder to a profile element of type " + ProfileElement.GetType().Name);
|
||||
|
||||
Folder _ = new(ProfileElement, "New folder", 0);
|
||||
Folder folder = new(ProfileElement, "New folder");
|
||||
ProfileElement.AddChild(folder, 0);
|
||||
_profileEditorService.SaveSelectedProfileConfiguration();
|
||||
}
|
||||
|
||||
@@ -146,8 +147,8 @@ namespace Artemis.UI.Screens.ProfileEditor.ProfileTree.TreeItem
|
||||
if (!SupportsChildren)
|
||||
throw new ArtemisUIException("Cannot add a layer to a profile element of type " + ProfileElement.GetType().Name);
|
||||
|
||||
Layer layer = new(ProfileElement, "New layer", 0);
|
||||
|
||||
Layer layer = new(ProfileElement, "New layer");
|
||||
ProfileElement.AddChild(layer, 0);
|
||||
// Could be null if the default brush got disabled
|
||||
LayerBrushDescriptor brush = _layerBrushService.GetDefaultLayerBrush();
|
||||
if (brush != null)
|
||||
|
||||
@@ -90,6 +90,7 @@ namespace Artemis.UI.Screens.ProfileEditor.Visualization.Tools
|
||||
private void CreateLayer(Folder folder, List<ArtemisLed> selectedLeds)
|
||||
{
|
||||
Layer newLayer = new(folder, "New layer");
|
||||
folder.AddChild(newLayer);
|
||||
|
||||
LayerBrushDescriptor brush = _layerBrushService.GetDefaultLayerBrush();
|
||||
if (brush != null)
|
||||
|
||||
Reference in new issue
Block a user