diff --git a/src/Artemis.UI/Screens/ProfileEditor/ProfileTree/ProfileTreeView.xaml b/src/Artemis.UI/Screens/ProfileEditor/ProfileTree/ProfileTreeView.xaml index ce49b864f..c3388512a 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/ProfileTree/ProfileTreeView.xaml +++ b/src/Artemis.UI/Screens/ProfileEditor/ProfileTree/ProfileTreeView.xaml @@ -95,7 +95,7 @@ - + diff --git a/src/Artemis.UI/Screens/ProfileEditor/ProfileTree/ProfileTreeViewModel.cs b/src/Artemis.UI/Screens/ProfileEditor/ProfileTree/ProfileTreeViewModel.cs index 39cd410a8..9156b86f1 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/ProfileTree/ProfileTreeViewModel.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/ProfileTree/ProfileTreeViewModel.cs @@ -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(); } } diff --git a/src/Artemis.UI/Screens/ProfileEditor/ProfileTree/TreeItem/TreeItemViewModel.cs b/src/Artemis.UI/Screens/ProfileEditor/ProfileTree/TreeItem/TreeItemViewModel.cs index 2ae8702b1..e4309201c 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/ProfileTree/TreeItem/TreeItemViewModel.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/ProfileTree/TreeItem/TreeItemViewModel.cs @@ -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()