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>
|
||||
</TreeView.ContextMenu>
|
||||
<b:Interaction.Behaviors>
|
||||
<behaviors:TreeViewSelectionBehavior SelectedItem="{Binding SelectedTreeItem, IsAsync=True}" />
|
||||
<behaviors:TreeViewSelectionBehavior SelectedItem="{Binding SelectedTreeItem}" />
|
||||
</b:Interaction.Behaviors>
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type treeItem:FolderViewModel}" ItemsSource="{Binding Items}">
|
||||
|
||||
@ -33,11 +33,8 @@ namespace Artemis.UI.Screens.ProfileEditor.ProfileTree
|
||||
get => _selectedTreeItem;
|
||||
set
|
||||
{
|
||||
if (_updatingTree) return;
|
||||
if (!SetAndNotify(ref _selectedTreeItem, value)) return;
|
||||
if (_draggingTreeView) return;
|
||||
|
||||
ApplySelectedTreeItem();
|
||||
if (!_updatingTree && SetAndNotify(ref _selectedTreeItem, value) && !_draggingTreeView)
|
||||
ApplySelectedTreeItem();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -184,6 +184,7 @@ namespace Artemis.UI.Screens.ProfileEditor.ProfileTree.TreeItem
|
||||
else
|
||||
newSelection = ProfileElement.Parent;
|
||||
}
|
||||
_profileEditorService.ChangeSelectedProfileElement(newSelection as RenderProfileElement);
|
||||
|
||||
// Farewell, cruel world
|
||||
TreeItemViewModel parent = (TreeItemViewModel) Parent;
|
||||
@ -191,7 +192,6 @@ namespace Artemis.UI.Screens.ProfileEditor.ProfileTree.TreeItem
|
||||
parent.RemoveExistingElement(this);
|
||||
|
||||
_profileEditorService.SaveSelectedProfileConfiguration();
|
||||
_profileEditorService.ChangeSelectedProfileElement(newSelection as RenderProfileElement);
|
||||
}
|
||||
|
||||
public void DuplicateElement()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user