Fix logic error in selection tool.

Any new selection made by clicking is not a hover selection.

Fixes https://gitlab.com/kicad/code/kicad/issues/9857
This commit is contained in:
Jeff Young 2021-12-02 16:54:13 +00:00
parent f8d61d689b
commit 863699f2d1
1 changed files with 3 additions and 2 deletions

View File

@ -369,7 +369,6 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
m_disambiguateTimer.Stop(); m_disambiguateTimer.Stop();
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 );
@ -377,7 +376,7 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
bool continueSelect = true; bool continueSelect = true;
// Collect items at the clicked location (doesn't select them yet) // Collect items at the clicked location (doesn't select them yet)
if( CollectHits( collector, evt->Position()) ) if( CollectHits( collector, evt->Position() ) )
{ {
narrowSelection( collector, evt->Position(), false, false ); narrowSelection( collector, evt->Position(), false, false );
@ -440,6 +439,8 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
// items we previously collected // items we previously collected
selectPoint( collector, nullptr, nullptr, m_additive, m_subtractive, selectPoint( collector, nullptr, nullptr, m_additive, m_subtractive,
m_exclusive_or ); m_exclusive_or );
m_selection.SetIsHover( false );
} }
} }
else if( evt->IsClick( BUT_RIGHT ) ) else if( evt->IsClick( BUT_RIGHT ) )