Profile tree - Fixed moving layers into folders leaving a copy behind

Profile tree - Added rename/delete hotkeys to elements
Profile tree - Moved dialogs to the tree panel
Layer properties - Auto-select transform tool when modifying transform properties
This commit is contained in:
Robert committed 2020-09-17 19:45:36 +02:00
1 parent 375c04090b
commit a3290c40f8
25 files changed
+239 -146

No files matched your search

@@ -31,7 +31,6 @@ namespace Artemis.UI.Screens.ProfileEditor.Visualization
private BindableCollection<ArtemisDevice> _devices;
private BindableCollection<ArtemisLed> _highlightedLeds;
private PluginSetting<bool> _highlightSelectedLayer;
private bool _isInitializing;
private PluginSetting<bool> _onlyShowSelectedShape;
private PanZoomViewModel _panZoomViewModel;
private Layer _previousSelectedLayer;
@@ -67,12 +66,6 @@ namespace Artemis.UI.Screens.ProfileEditor.Visualization
eventAggregator.Subscribe(this);
}
public bool IsInitializing
{
get => _isInitializing;
private set => SetAndNotify(ref _isInitializing, value);
}
public bool CanSelectEditTool
{
get => _canSelectEditTool;
@@ -375,11 +368,16 @@ namespace Artemis.UI.Screens.ProfileEditor.Visualization
private void OnProfileElementSelected(object sender, EventArgs e)
{
if (_previousSelectedLayer != null)
{
_previousSelectedLayer.LayerBrushUpdated -= SelectedLayerOnLayerBrushUpdated;
_previousSelectedLayer.Transform.LayerPropertyOnCurrentValueSet -= TransformValueChanged;
}
if (_profileEditorService.SelectedProfileElement is Layer layer)
{
_previousSelectedLayer = layer;
_previousSelectedLayer.LayerBrushUpdated += SelectedLayerOnLayerBrushUpdated;
_previousSelectedLayer.Transform.LayerPropertyOnCurrentValueSet += TransformValueChanged;
}
else
_previousSelectedLayer = null;
@@ -392,7 +390,13 @@ namespace Artemis.UI.Screens.ProfileEditor.Visualization
{
UpdateCanSelectEditTool();
}
private void TransformValueChanged(object? sender, LayerPropertyEventArgs e)
{
if (ActiveToolIndex != 1)
ActivateToolByIndex(1);
}
private void OnSelectedProfileElementUpdated(object sender, EventArgs e)
{
ApplyActiveProfile();
@@ -36,7 +36,6 @@
Data="{Binding ShapeGeometry, Mode=OneWay}"
Fill="Transparent"
Stroke="{DynamicResource PrimaryHueMidBrush}"
StrokeThickness="{Binding OutlineThickness}"
StrokeDashArray="2 2"
Cursor="/Resources/Cursors/aero_drag.cur"
MouseDown="MoveOnMouseDown"