From 8e4a430e19513bbdd90bd4ebca2aeaad7d875c94 Mon Sep 17 00:00:00 2001 From: Robert Date: Sat, 13 Dec 2025 16:19:16 +0100 Subject: [PATCH] Workshop - Fix default sorting being blank Sidebar - Allow right-clicking a profile to open the menu without opening the profile Profile editor - Fix editor not stopping to focus the profile --- .../Services/ProfileEditor/ProfileEditorService.cs | 5 ++--- .../Screens/ProfileEditor/ProfileEditorViewModel.cs | 2 +- .../Sidebar/SidebarProfileConfigurationView.axaml | 1 + .../Sidebar/SidebarProfileConfigurationView.axaml.cs | 9 ++++++++- .../Workshop/Entries/List/EntryListInputViewModel.cs | 2 +- 5 files changed, 13 insertions(+), 6 deletions(-) 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}}">