Be sure to stop the timer when triggering d-click

Some mice apparently trigger double-click without triggering a click, so
stop the timer when we receive this event

Fixes https://gitlab.com/kicad/code/kicad/issues/9106
This commit is contained in:
Seth Hillbrand 2021-09-06 12:26:20 -07:00
parent 343dbf0f5b
commit 0f38a35531
2 changed files with 4 additions and 0 deletions

View File

@ -481,6 +481,8 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
} }
else if( evt->IsDblClick( BUT_LEFT ) ) else if( evt->IsDblClick( BUT_LEFT ) )
{ {
m_disambiguateTimer.Stop();
// double click? Display the properties window // double click? Display the properties window
if( SCH_EDIT_FRAME* schframe = dynamic_cast<SCH_EDIT_FRAME*>( m_frame ) ) if( SCH_EDIT_FRAME* schframe = dynamic_cast<SCH_EDIT_FRAME*>( m_frame ) )
schframe->FocusOnItem( nullptr ); schframe->FocusOnItem( nullptr );

View File

@ -304,6 +304,8 @@ int PCB_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
} }
else if( evt->IsDblClick( BUT_LEFT ) ) else if( evt->IsDblClick( BUT_LEFT ) )
{ {
m_disambiguateTimer.Stop();
// Double click? Display the properties window // Double click? Display the properties window
m_frame->FocusOnItem( nullptr ); m_frame->FocusOnItem( nullptr );