From 863699f2d15fc0ac0d8a463dc90663dec6763e42 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 2 Dec 2021 16:54:13 +0000 Subject: [PATCH] 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 --- eeschema/tools/ee_selection_tool.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eeschema/tools/ee_selection_tool.cpp b/eeschema/tools/ee_selection_tool.cpp index cc1f5c2736..2a759e17fb 100644 --- a/eeschema/tools/ee_selection_tool.cpp +++ b/eeschema/tools/ee_selection_tool.cpp @@ -369,7 +369,6 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent ) m_disambiguateTimer.Stop(); - if( SCH_EDIT_FRAME* schframe = dynamic_cast( m_frame ) ) schframe->FocusOnItem( nullptr ); @@ -377,7 +376,7 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent ) bool continueSelect = true; // 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 ); @@ -440,6 +439,8 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent ) // items we previously collected selectPoint( collector, nullptr, nullptr, m_additive, m_subtractive, m_exclusive_or ); + + m_selection.SetIsHover( false ); } } else if( evt->IsClick( BUT_RIGHT ) )