mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-02-04 02:43:32 +00:00
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
This commit is contained in:
parent
0eb2c3a3b2
commit
8e4a430e19
@ -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);
|
||||
|
||||
@ -203,7 +203,7 @@ public partial class ProfileEditorViewModel : RoutableScreen<ProfileViewModelPar
|
||||
/// <inheritdoc />
|
||||
public override async Task OnClosing(NavigationArguments args)
|
||||
{
|
||||
if (!args.Path.StartsWith("profile-editor"))
|
||||
if (!args.Path.StartsWith("profile"))
|
||||
{
|
||||
ProfileConfiguration = null;
|
||||
await _profileEditorService.ChangeCurrentProfileConfiguration(null);
|
||||
|
||||
@ -71,6 +71,7 @@
|
||||
ColumnDefinitions="Auto,*,Auto,Auto"
|
||||
Background="Transparent"
|
||||
ContextFlyout="{StaticResource ProfileMenuFlyout}"
|
||||
PointerPressed="ProfileContainerGrid_OnPointerPressed"
|
||||
Classes.flyout-open="{CompiledBinding IsOpen, Source={StaticResource ProfileMenuFlyout}}">
|
||||
<shared:ProfileConfigurationIcon Grid.Column="0"
|
||||
x:Name="ProfileIcon"
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.ReactiveUI;
|
||||
|
||||
namespace Artemis.UI.Screens.Sidebar;
|
||||
@ -10,4 +11,10 @@ public partial class SidebarProfileConfigurationView : ReactiveUserControl<Sideb
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void ProfileContainerGrid_OnPointerPressed(object? sender, PointerPressedEventArgs e)
|
||||
{
|
||||
// When right-clicking only open the context menu, don't select the profile
|
||||
if (e.GetCurrentPoint(this).Properties.IsRightButtonPressed)
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
@ -17,7 +17,7 @@ public partial class EntryListInputViewModel : ViewModelBase
|
||||
public EntryListInputViewModel(ISettingsService settingsService)
|
||||
{
|
||||
_search = _lastSearch;
|
||||
_sortBy = settingsService.GetSetting("Workshop.SortBy", 10);
|
||||
_sortBy = settingsService.GetSetting("Workshop.SortBy", 0);
|
||||
_sortBy.AutoSave = true;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user