mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-02-04 02:43:32 +00:00
Merge branch 'development'
This commit is contained in:
commit
fdc02ec581
@ -183,12 +183,11 @@ internal class ProfileEditorService : IProfileEditorService
|
|||||||
// Activate the profile and it's mode off of the UI thread
|
// Activate the profile and it's mode off of the UI thread
|
||||||
await Task.Run(() =>
|
await Task.Run(() =>
|
||||||
{
|
{
|
||||||
|
_profileService.FocusProfile = profileConfiguration;
|
||||||
|
|
||||||
// Activate the profile if one was provided
|
// Activate the profile if one was provided
|
||||||
if (profileConfiguration != null)
|
if (profileConfiguration != null)
|
||||||
{
|
|
||||||
_profileService.FocusProfile = profileConfiguration;
|
|
||||||
_profileService.ActivateProfile(profileConfiguration);
|
_profileService.ActivateProfile(profileConfiguration);
|
||||||
}
|
|
||||||
|
|
||||||
// If there is no profile configuration or module, deliberately set the override to null
|
// If there is no profile configuration or module, deliberately set the override to null
|
||||||
_moduleService.SetActivationOverride(profileConfiguration?.Module);
|
_moduleService.SetActivationOverride(profileConfiguration?.Module);
|
||||||
|
|||||||
@ -203,7 +203,7 @@ public partial class ProfileEditorViewModel : RoutableScreen<ProfileViewModelPar
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override async Task OnClosing(NavigationArguments args)
|
public override async Task OnClosing(NavigationArguments args)
|
||||||
{
|
{
|
||||||
if (!args.Path.StartsWith("profile-editor"))
|
if (!args.Path.StartsWith("profile"))
|
||||||
{
|
{
|
||||||
ProfileConfiguration = null;
|
ProfileConfiguration = null;
|
||||||
await _profileEditorService.ChangeCurrentProfileConfiguration(null);
|
await _profileEditorService.ChangeCurrentProfileConfiguration(null);
|
||||||
|
|||||||
@ -71,6 +71,7 @@
|
|||||||
ColumnDefinitions="Auto,*,Auto,Auto"
|
ColumnDefinitions="Auto,*,Auto,Auto"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
ContextFlyout="{StaticResource ProfileMenuFlyout}"
|
ContextFlyout="{StaticResource ProfileMenuFlyout}"
|
||||||
|
PointerPressed="ProfileContainerGrid_OnPointerPressed"
|
||||||
Classes.flyout-open="{CompiledBinding IsOpen, Source={StaticResource ProfileMenuFlyout}}">
|
Classes.flyout-open="{CompiledBinding IsOpen, Source={StaticResource ProfileMenuFlyout}}">
|
||||||
<shared:ProfileConfigurationIcon Grid.Column="0"
|
<shared:ProfileConfigurationIcon Grid.Column="0"
|
||||||
x:Name="ProfileIcon"
|
x:Name="ProfileIcon"
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Input;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
using Avalonia.ReactiveUI;
|
using Avalonia.ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Sidebar;
|
namespace Artemis.UI.Screens.Sidebar;
|
||||||
@ -10,4 +11,10 @@ public partial class SidebarProfileConfigurationView : ReactiveUserControl<Sideb
|
|||||||
InitializeComponent();
|
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)
|
public EntryListInputViewModel(ISettingsService settingsService)
|
||||||
{
|
{
|
||||||
_search = _lastSearch;
|
_search = _lastSearch;
|
||||||
_sortBy = settingsService.GetSetting("Workshop.SortBy", 10);
|
_sortBy = settingsService.GetSetting("Workshop.SortBy", 0);
|
||||||
_sortBy.AutoSave = true;
|
_sortBy.AutoSave = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user