Browse Source

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

(cherry picked from commit a30ad0b54a)
7.0
Seth Hillbrand 4 years ago
parent
commit
535ea800c0
  1. 5
      eeschema/tools/ee_selection_tool.cpp
  2. 5
      pagelayout_editor/tools/pl_selection_tool.cpp
  3. 5
      pcbnew/tools/pcb_selection_tool.cpp

5
eeschema/tools/ee_selection_tool.cpp

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

5
pagelayout_editor/tools/pl_selection_tool.cpp

@ -235,6 +235,11 @@ int PL_SELECTION_TOOL::Main( 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;
SelectPoint( m_originalCursor, &m_canceledMenu );
m_skip_heuristics = false;

5
pcbnew/tools/pcb_selection_tool.cpp

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

Loading…
Cancel
Save