mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Profile editor - Fixed freeze on delete
This commit is contained in:
parent
3f22ebae8a
commit
10c80fb9c2
@ -95,7 +95,7 @@
|
|||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</TreeView.ContextMenu>
|
</TreeView.ContextMenu>
|
||||||
<b:Interaction.Behaviors>
|
<b:Interaction.Behaviors>
|
||||||
<behaviors:TreeViewSelectionBehavior SelectedItem="{Binding SelectedTreeItem, IsAsync=True}" />
|
<behaviors:TreeViewSelectionBehavior SelectedItem="{Binding SelectedTreeItem}" />
|
||||||
</b:Interaction.Behaviors>
|
</b:Interaction.Behaviors>
|
||||||
<TreeView.Resources>
|
<TreeView.Resources>
|
||||||
<HierarchicalDataTemplate DataType="{x:Type treeItem:FolderViewModel}" ItemsSource="{Binding Items}">
|
<HierarchicalDataTemplate DataType="{x:Type treeItem:FolderViewModel}" ItemsSource="{Binding Items}">
|
||||||
|
|||||||
@ -33,10 +33,7 @@ namespace Artemis.UI.Screens.ProfileEditor.ProfileTree
|
|||||||
get => _selectedTreeItem;
|
get => _selectedTreeItem;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (_updatingTree) return;
|
if (!_updatingTree && SetAndNotify(ref _selectedTreeItem, value) && !_draggingTreeView)
|
||||||
if (!SetAndNotify(ref _selectedTreeItem, value)) return;
|
|
||||||
if (_draggingTreeView) return;
|
|
||||||
|
|
||||||
ApplySelectedTreeItem();
|
ApplySelectedTreeItem();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -184,6 +184,7 @@ namespace Artemis.UI.Screens.ProfileEditor.ProfileTree.TreeItem
|
|||||||
else
|
else
|
||||||
newSelection = ProfileElement.Parent;
|
newSelection = ProfileElement.Parent;
|
||||||
}
|
}
|
||||||
|
_profileEditorService.ChangeSelectedProfileElement(newSelection as RenderProfileElement);
|
||||||
|
|
||||||
// Farewell, cruel world
|
// Farewell, cruel world
|
||||||
TreeItemViewModel parent = (TreeItemViewModel) Parent;
|
TreeItemViewModel parent = (TreeItemViewModel) Parent;
|
||||||
@ -191,7 +192,6 @@ namespace Artemis.UI.Screens.ProfileEditor.ProfileTree.TreeItem
|
|||||||
parent.RemoveExistingElement(this);
|
parent.RemoveExistingElement(this);
|
||||||
|
|
||||||
_profileEditorService.SaveSelectedProfileConfiguration();
|
_profileEditorService.SaveSelectedProfileConfiguration();
|
||||||
_profileEditorService.ChangeSelectedProfileElement(newSelection as RenderProfileElement);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DuplicateElement()
|
public void DuplicateElement()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user