Browse Source

Get platform settings from TopLevel.

Allows easier unit testing.
pull/11794/head
Steven Kirk 3 years ago
parent
commit
ca22dd8783
  1. 2
      src/Avalonia.Controls/Control.cs

2
src/Avalonia.Controls/Control.cs

@ -480,7 +480,7 @@ namespace Avalonia.Controls
if (e.Source == this if (e.Source == this
&& !e.Handled) && !e.Handled)
{ {
var keymap = Application.Current!.PlatformSettings?.HotkeyConfiguration.OpenContextMenu; var keymap = TopLevel.GetTopLevel(this)?.PlatformSettings?.HotkeyConfiguration.OpenContextMenu;
if (keymap is null) if (keymap is null)
{ {

Loading…
Cancel
Save