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.
This commit is contained in:
Mike Williams 2021-09-24 15:44:26 -04:00 committed by Seth Hillbrand
parent 9ca836d1ea
commit d90dc77e00
3 changed files with 4 additions and 19 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;