Skip to content

Commit fdc02ec

Browse files
committed
Merge branch 'development'
2 parents db59b5d + 8e4a430 commit fdc02ec

5 files changed

Lines changed: 13 additions & 6 deletions

File tree

src/Artemis.UI.Shared/Services/ProfileEditor/ProfileEditorService.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,11 @@ public async Task ChangeCurrentProfileConfiguration(ProfileConfiguration? profil
183183
// Activate the profile and it's mode off of the UI thread
184184
await Task.Run(() =>
185185
{
186+
_profileService.FocusProfile = profileConfiguration;
187+
186188
// Activate the profile if one was provided
187189
if (profileConfiguration != null)
188-
{
189-
_profileService.FocusProfile = profileConfiguration;
190190
_profileService.ActivateProfile(profileConfiguration);
191-
}
192191

193192
// If there is no profile configuration or module, deliberately set the override to null
194193
_moduleService.SetActivationOverride(profileConfiguration?.Module);

src/Artemis.UI/Screens/ProfileEditor/ProfileEditorViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public override async Task OnNavigating(ProfileViewModelParameters parameters, N
203203
/// <inheritdoc />
204204
public override async Task OnClosing(NavigationArguments args)
205205
{
206-
if (!args.Path.StartsWith("profile-editor"))
206+
if (!args.Path.StartsWith("profile"))
207207
{
208208
ProfileConfiguration = null;
209209
await _profileEditorService.ChangeCurrentProfileConfiguration(null);

src/Artemis.UI/Screens/Sidebar/SidebarProfileConfigurationView.axaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
ColumnDefinitions="Auto,*,Auto,Auto"
7272
Background="Transparent"
7373
ContextFlyout="{StaticResource ProfileMenuFlyout}"
74+
PointerPressed="ProfileContainerGrid_OnPointerPressed"
7475
Classes.flyout-open="{CompiledBinding IsOpen, Source={StaticResource ProfileMenuFlyout}}">
7576
<shared:ProfileConfigurationIcon Grid.Column="0"
7677
x:Name="ProfileIcon"

src/Artemis.UI/Screens/Sidebar/SidebarProfileConfigurationView.axaml.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Avalonia.Markup.Xaml;
1+
using Avalonia.Input;
2+
using Avalonia.Markup.Xaml;
23
using Avalonia.ReactiveUI;
34

45
namespace Artemis.UI.Screens.Sidebar;
@@ -10,4 +11,10 @@ public SidebarProfileConfigurationView()
1011
InitializeComponent();
1112
}
1213

14+
private void ProfileContainerGrid_OnPointerPressed(object? sender, PointerPressedEventArgs e)
15+
{
16+
// When right-clicking only open the context menu, don't select the profile
17+
if (e.GetCurrentPoint(this).Properties.IsRightButtonPressed)
18+
e.Handled = true;
19+
}
1320
}

src/Artemis.UI/Screens/Workshop/Entries/List/EntryListInputViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public partial class EntryListInputViewModel : ViewModelBase
1717
public EntryListInputViewModel(ISettingsService settingsService)
1818
{
1919
_search = _lastSearch;
20-
_sortBy = settingsService.GetSetting("Workshop.SortBy", 10);
20+
_sortBy = settingsService.GetSetting("Workshop.SortBy", 0);
2121
_sortBy.AutoSave = true;
2222
}
2323

0 commit comments

Comments
 (0)