diff --git a/eeschema/tools/sch_find_replace_tool.cpp b/eeschema/tools/sch_find_replace_tool.cpp index 5170ee43c2..1dcebd9679 100644 --- a/eeschema/tools/sch_find_replace_tool.cpp +++ b/eeschema/tools/sch_find_replace_tool.cpp @@ -127,8 +127,7 @@ SCH_ITEM* SCH_FIND_REPLACE_TOOL::nextMatch( SCH_SCREEN* aScreen, SCH_SHEET_PATH* for( SCH_PIN* pin : cmp->GetPins() ) sorted_items.push_back( pin ); } - - if( item->Type() == SCH_SHEET_T ) + else if( item->Type() == SCH_SHEET_T ) { SCH_SHEET* sheet = static_cast( item ); @@ -138,6 +137,13 @@ SCH_ITEM* SCH_FIND_REPLACE_TOOL::nextMatch( SCH_SCREEN* aScreen, SCH_SHEET_PATH* for( SCH_SHEET_PIN* pin : sheet->GetPins() ) sorted_items.push_back( pin ); } + else if( item->IsType( { SCH_LABEL_LOCATE_ANY_T } ) ) + { + SCH_LABEL_BASE* label = static_cast( item ); + + for( SCH_FIELD& field : label->GetFields() ) + sorted_items.push_back( &field ); + } } std::sort( sorted_items.begin(), sorted_items.end(),