Don't add first found object to selection until Find (or return) is hit.

Fixes: lp:1838021
* https://bugs.launchpad.net/kicad/+bug/1838021
This commit is contained in:
Jeff Young 2019-07-27 00:20:25 -06:00
parent daac54b5d2
commit 2af41e87f9
1 changed files with 0 additions and 7 deletions

View File

@ -148,16 +148,9 @@ int SCH_EDITOR_CONTROL::UpdateFind( const TOOL_EVENT& aEvent )
INSPECTOR_FUNC inspector = [&] ( EDA_ITEM* item, void* ) INSPECTOR_FUNC inspector = [&] ( EDA_ITEM* item, void* )
{ {
if( data && item->Matches( *data, nullptr ) ) if( data && item->Matches( *data, nullptr ) )
{
m_selectionTool->BrightenItem( item ); m_selectionTool->BrightenItem( item );
if( m_selectionTool->GetSelection().GetSize() == 0 )
m_selectionTool->AddItemToSel( item );
}
else if( item->IsBrightened() ) else if( item->IsBrightened() )
{
m_selectionTool->UnbrightenItem( item ); m_selectionTool->UnbrightenItem( item );
}
return SEARCH_CONTINUE; return SEARCH_CONTINUE;
}; };