Look for sheet pins inside sheets.

Fixes https://gitlab.com/kicad/code/kicad/issues/11297
This commit is contained in:
Jeff Young 2022-03-31 22:09:35 +01:00
parent 48a70a65b5
commit 6b99a937d8
1 changed files with 7 additions and 2 deletions

View File

@ -31,6 +31,7 @@
#include <sch_line.h> #include <sch_line.h>
#include <sch_junction.h> #include <sch_junction.h>
#include <sch_sheet.h> #include <sch_sheet.h>
#include <sch_sheet_pin.h>
#include <schematic.h> #include <schematic.h>
#include <advanced_config.h> #include <advanced_config.h>
#include <tool/tool_manager.h> #include <tool/tool_manager.h>
@ -446,6 +447,12 @@ void DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::visitItem( const SCH_SHEET_PATH& aShe
if( m_setFillColor->GetValue() ) if( m_setFillColor->GetValue() )
sheet->SetBackgroundColor( m_fillColorSwatch->GetSwatchColor() ); sheet->SetBackgroundColor( m_fillColorSwatch->GetSwatchColor() );
} }
if( m_sheetPins->GetValue() )
{
for( SCH_SHEET_PIN* pin : sheet->GetPins() )
processItem( aSheetPath, pin );
}
} }
else if( aItem->Type() == SCH_JUNCTION_T ) else if( aItem->Type() == SCH_JUNCTION_T )
{ {
@ -473,8 +480,6 @@ void DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::visitItem( const SCH_SHEET_PATH& aShe
processItem( aSheetPath, aItem ); processItem( aSheetPath, aItem );
else if( m_hierLabels->GetValue() && aItem->Type() == SCH_HIER_LABEL_T ) else if( m_hierLabels->GetValue() && aItem->Type() == SCH_HIER_LABEL_T )
processItem( aSheetPath, aItem ); processItem( aSheetPath, aItem );
else if( m_sheetPins->GetValue() && aItem->Type() == SCH_SHEET_PIN_T )
processItem( aSheetPath, aItem );
else if( m_schTextAndGraphics->GetValue() && aItem->IsType( schTextAndGraphics ) ) else if( m_schTextAndGraphics->GetValue() && aItem->IsType( schTextAndGraphics ) )
processItem( aSheetPath, aItem ); processItem( aSheetPath, aItem );
} }