Honor modifier keys in diambiguation

Needs to be reset for the new action before selecting elements at a
point.

Fixes https://gitlab.com/kicad/code/kicad/issues/9712
This commit is contained in:
Seth Hillbrand 2022-02-25 16:14:41 -08:00
parent ab835937a7
commit a30ad0b54a
3 changed files with 15 additions and 0 deletions

View File

@ -754,6 +754,11 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
int EE_SELECTION_TOOL::disambiguateCursor( const TOOL_EVENT& aEvent ) int EE_SELECTION_TOOL::disambiguateCursor( const TOOL_EVENT& aEvent )
{ {
wxMouseState keyboardState = wxGetMouseState();
setModifiersState( keyboardState.ShiftDown(), keyboardState.ControlDown(),
keyboardState.AltDown() );
m_skip_heuristics = true; m_skip_heuristics = true;
SelectPoint( m_originalCursor, EE_COLLECTOR::AllItems, nullptr, &m_canceledMenu, false, SelectPoint( m_originalCursor, EE_COLLECTOR::AllItems, nullptr, &m_canceledMenu, false,
m_additive, m_subtractive, m_exclusive_or ); m_additive, m_subtractive, m_exclusive_or );

View File

@ -235,6 +235,11 @@ int PL_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
int PL_SELECTION_TOOL::disambiguateCursor( const TOOL_EVENT& aEvent ) int PL_SELECTION_TOOL::disambiguateCursor( const TOOL_EVENT& aEvent )
{ {
wxMouseState keyboardState = wxGetMouseState();
setModifiersState( keyboardState.ShiftDown(), keyboardState.ControlDown(),
keyboardState.AltDown() );
m_skip_heuristics = true; m_skip_heuristics = true;
SelectPoint( m_originalCursor, &m_canceledMenu ); SelectPoint( m_originalCursor, &m_canceledMenu );
m_skip_heuristics = false; m_skip_heuristics = false;

View File

@ -922,6 +922,11 @@ bool PCB_SELECTION_TOOL::selectMultiple()
int PCB_SELECTION_TOOL::disambiguateCursor( const TOOL_EVENT& aEvent ) int PCB_SELECTION_TOOL::disambiguateCursor( const TOOL_EVENT& aEvent )
{ {
wxMouseState keyboardState = wxGetMouseState();
setModifiersState( keyboardState.ShiftDown(), keyboardState.ControlDown(),
keyboardState.AltDown() );
m_skip_heuristics = true; m_skip_heuristics = true;
selectPoint( m_originalCursor, false, &m_canceledMenu ); selectPoint( m_originalCursor, false, &m_canceledMenu );
m_skip_heuristics = false; m_skip_heuristics = false;