Revert IsAttached() fix as it doesn't handle hotkeys from the main menubar.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17101
This commit is contained in:
parent
be83f276c4
commit
6ec51f6a69
|
@ -546,11 +546,10 @@ void ACTION_MENU::OnMenuEvent( wxMenuEvent& aEvent )
|
||||||
{
|
{
|
||||||
evt->SetMousePosition( g_menu_open_position );
|
evt->SetMousePosition( g_menu_open_position );
|
||||||
}
|
}
|
||||||
// Check if it is a menubar event, and don't get any position if it is.
|
// Check if it is a menubar event, and don't get any position if it is. Note that we
|
||||||
// The original hack is to see if g_last_menu_highlighted_id matches to see if it's a menubar menu event
|
// can't use IsAttached() here, as it only differentiates a context menu, and we also
|
||||||
// IsAttached() checks to see if a menubar was attached to the menu by wx, and if there is one, then the event
|
// want a hotkey to generate a position.
|
||||||
// is from a menubar menu.
|
else if( g_last_menu_highlighted_id == aEvent.GetId() )
|
||||||
else if( IsAttached() || ( g_last_menu_highlighted_id == aEvent.GetId() ) )
|
|
||||||
{
|
{
|
||||||
evt->SetHasPosition( false );
|
evt->SetHasPosition( false );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue