Don't copy modifiers to prime events.

The modifiers go with the hotkey, not with the action.

Fixes https://gitlab.com/kicad/code/kicad/issues/11618
This commit is contained in:
Jeff Young
2022-05-16 13:51:40 +01:00
parent 1f088984ce
commit f2fc78f380
9 changed files with 37 additions and 42 deletions
+9 -3
View File
@@ -350,9 +350,15 @@ void TOOL_MANAGER::CancelTool()
void TOOL_MANAGER::PrimeTool( const VECTOR2D& aPosition )
{
int modifiers = 0;
modifiers |= wxGetKeyState( WXK_SHIFT ) ? MD_SHIFT : 0;
modifiers |= wxGetKeyState( WXK_CONTROL ) ? MD_CTRL : 0;
modifiers |= wxGetKeyState( WXK_ALT ) ? MD_ALT : 0;
/*
* Don't include any modifiers. They're part of the hotkey, not part of the resulting
* click.
*
* modifiers |= wxGetKeyState( WXK_SHIFT ) ? MD_SHIFT : 0;
* modifiers |= wxGetKeyState( WXK_CONTROL ) ? MD_CTRL : 0;
* modifiers |= wxGetKeyState( WXK_ALT ) ? MD_ALT : 0;
*/
TOOL_EVENT evt( TC_MOUSE, TA_PRIME, BUT_LEFT | modifiers );
evt.SetMousePosition( aPosition );