Profile editor - Ensure hotkeys work whenever working i nthe editor

This commit is contained in:
Robert committed 2022-06-08 21:19:08 +02:00
1 parent 0d3890e560
commit 38986b73ac
8 files changed
+59 -21

No files matched your search

@@ -1,6 +1,8 @@
using Avalonia.Controls;
using Avalonia.Interactivity;
using Avalonia.Markup.Xaml;
using Avalonia.ReactiveUI;
using Avalonia.VisualTree;
namespace Artemis.UI.Screens.ProfileEditor.MenuBar;
@@ -16,7 +18,9 @@ public class MenuBarView : ReactiveUserControl<MenuBarViewModel>
AvaloniaXamlLoader.Load(this);
}
private void MenuItem_OnSubmenuOpened(object? sender, RoutedEventArgs e)
private void MenuBase_OnMenuClosed(object? sender, RoutedEventArgs e)
{
ProfileEditorView? profileEditorView = this.FindAncestorOfType<Window>().FindDescendantOfType<ProfileEditorView>();
profileEditorView?.Focus();
}
}