From d90dc77e000b17b5dbb6d007b175ab04a4f1319f Mon Sep 17 00:00:00 2001 From: Mike Williams Date: Fri, 24 Sep 2021 15:44:26 -0400 Subject: [PATCH] Selection: Don't drop small moves If we do a real drag, the timer will be cancelled. If we don't, then the user is still holding the mouse button down and would probably like to see the menu. Otherwise it appears the action is dropped. --- eeschema/tools/ee_selection_tool.cpp | 9 ++------- pagelayout_editor/tools/pl_selection_tool.cpp | 7 +------ pcbnew/tools/pcb_selection_tool.cpp | 7 +------ 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/eeschema/tools/ee_selection_tool.cpp b/eeschema/tools/ee_selection_tool.cpp index 8614798654..95693ac9c8 100644 --- a/eeschema/tools/ee_selection_tool.cpp +++ b/eeschema/tools/ee_selection_tool.cpp @@ -732,14 +732,9 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent ) int EE_SELECTION_TOOL::disambiguateCursor( const TOOL_EVENT& aEvent ) { - VECTOR2I pos = m_toolMgr->GetMousePosition(); - - if( pos != m_originalCursor ) - return 0; - m_skip_heuristics = true; - SelectPoint( pos, EE_COLLECTOR::AllItems, nullptr, &m_canceledMenu, false, m_additive, - m_subtractive, m_exclusive_or ); + SelectPoint( m_originalCursor, EE_COLLECTOR::AllItems, nullptr, &m_canceledMenu, false, + m_additive, m_subtractive, m_exclusive_or ); m_skip_heuristics = false; return 0; diff --git a/pagelayout_editor/tools/pl_selection_tool.cpp b/pagelayout_editor/tools/pl_selection_tool.cpp index 9f14e8b4a3..3d8eb333ab 100644 --- a/pagelayout_editor/tools/pl_selection_tool.cpp +++ b/pagelayout_editor/tools/pl_selection_tool.cpp @@ -232,13 +232,8 @@ int PL_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent ) int PL_SELECTION_TOOL::disambiguateCursor( const TOOL_EVENT& aEvent ) { - VECTOR2I pos = m_toolMgr->GetMousePosition(); - - if( pos != m_originalCursor ) - return 0; - m_skip_heuristics = true; - SelectPoint( pos, &m_canceledMenu ); + SelectPoint( m_originalCursor, &m_canceledMenu ); m_skip_heuristics = false; return 0; diff --git a/pcbnew/tools/pcb_selection_tool.cpp b/pcbnew/tools/pcb_selection_tool.cpp index ece5eeab14..46c75d0dde 100644 --- a/pcbnew/tools/pcb_selection_tool.cpp +++ b/pcbnew/tools/pcb_selection_tool.cpp @@ -902,13 +902,8 @@ bool PCB_SELECTION_TOOL::selectMultiple() int PCB_SELECTION_TOOL::disambiguateCursor( const TOOL_EVENT& aEvent ) { - VECTOR2I pos = m_toolMgr->GetMousePosition(); - - if( pos != m_originalCursor ) - return 0; - m_skip_heuristics = true; - selectPoint( pos, false, &m_canceledMenu ); + selectPoint( m_originalCursor, false, &m_canceledMenu ); m_skip_heuristics = false; return 0;