diff --git a/src/Artemis.UI.Shared/Services/ProfileEditor/ProfileEditorService.cs b/src/Artemis.UI.Shared/Services/ProfileEditor/ProfileEditorService.cs index ae9518f83..421aad406 100644 --- a/src/Artemis.UI.Shared/Services/ProfileEditor/ProfileEditorService.cs +++ b/src/Artemis.UI.Shared/Services/ProfileEditor/ProfileEditorService.cs @@ -183,12 +183,11 @@ internal class ProfileEditorService : IProfileEditorService // Activate the profile and it's mode off of the UI thread await Task.Run(() => { + _profileService.FocusProfile = profileConfiguration; + // Activate the profile if one was provided if (profileConfiguration != null) - { - _profileService.FocusProfile = profileConfiguration; _profileService.ActivateProfile(profileConfiguration); - } // If there is no profile configuration or module, deliberately set the override to null _moduleService.SetActivationOverride(profileConfiguration?.Module); diff --git a/src/Artemis.UI/Screens/ProfileEditor/ProfileEditorViewModel.cs b/src/Artemis.UI/Screens/ProfileEditor/ProfileEditorViewModel.cs index 352a49339..6abf8acd3 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/ProfileEditorViewModel.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/ProfileEditorViewModel.cs @@ -203,7 +203,7 @@ public partial class ProfileEditorViewModel : RoutableScreen public override async Task OnClosing(NavigationArguments args) { - if (!args.Path.StartsWith("profile-editor")) + if (!args.Path.StartsWith("profile")) { ProfileConfiguration = null; await _profileEditorService.ChangeCurrentProfileConfiguration(null); diff --git a/src/Artemis.UI/Screens/Sidebar/SidebarProfileConfigurationView.axaml b/src/Artemis.UI/Screens/Sidebar/SidebarProfileConfigurationView.axaml index 5e7884967..529f04c5d 100644 --- a/src/Artemis.UI/Screens/Sidebar/SidebarProfileConfigurationView.axaml +++ b/src/Artemis.UI/Screens/Sidebar/SidebarProfileConfigurationView.axaml @@ -71,6 +71,7 @@ ColumnDefinitions="Auto,*,Auto,Auto" Background="Transparent" ContextFlyout="{StaticResource ProfileMenuFlyout}" + PointerPressed="ProfileContainerGrid_OnPointerPressed" Classes.flyout-open="{CompiledBinding IsOpen, Source={StaticResource ProfileMenuFlyout}}">