diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp index 74ba8b4456..1656737beb 100644 --- a/eeschema/sch_edit_frame.cpp +++ b/eeschema/sch_edit_frame.cpp @@ -1851,6 +1851,36 @@ void SCH_EDIT_FRAME::DisplayCurrentSheet() GetCurrentSheet().UpdateAllScreenReferences(); SetSheetNumberAndCount(); + EE_SELECTION_TOOL* selectionTool = m_toolManager->GetTool(); + + auto visit = + [&]( EDA_ITEM* item ) + { + if( m_findReplaceDialog + && !m_findReplaceData->findString.IsEmpty() + && item->Matches( *m_findReplaceData, &GetCurrentSheet() ) ) + { + item->SetForceVisible( true ); + selectionTool->BrightenItem( item ); + } + else if( item->IsBrightened() ) + { + item->SetForceVisible( false ); + selectionTool->UnbrightenItem( item ); + } + }; + + for( SCH_ITEM* item : screen->Items() ) + { + visit( item ); + + item->RunOnChildren( + [&]( SCH_ITEM* aChild ) + { + visit( aChild ); + } ); + } + if( !screen->m_zoomInitialized ) { initScreenZoom(); diff --git a/eeschema/tools/sch_editor_control.cpp b/eeschema/tools/sch_editor_control.cpp index 2494368626..cff28a34a5 100644 --- a/eeschema/tools/sch_editor_control.cpp +++ b/eeschema/tools/sch_editor_control.cpp @@ -542,7 +542,6 @@ int SCH_EDITOR_CONTROL::FindNext( const TOOL_EVENT& aEvent ) { m_frame->Schematic().SetCurrentSheet( *sheet ); m_frame->DisplayCurrentSheet(); - UpdateFind( ACTIONS::updateFind.MakeEvent() ); break; }