Global Label Dialog: add power nets to dropdrown
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9118
This commit is contained in:
parent
7ab651f078
commit
5a2f4c445b
|
@ -275,6 +275,16 @@ bool DIALOG_LABEL_PROPERTIES::TransferDataToWindow()
|
||||||
existingLabels.insert( UnescapeString( label->GetText() ) );
|
existingLabels.insert( UnescapeString( label->GetText() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add global power labels from power symbols
|
||||||
|
if( m_currentLabel->Type() == SCH_GLOBAL_LABEL_T )
|
||||||
|
{
|
||||||
|
for( SCH_ITEM* item : screen->Items().OfType( SCH_SYMBOL_LOCATE_POWER_T ) )
|
||||||
|
{
|
||||||
|
const SCH_SYMBOL* power = static_cast<const SCH_SYMBOL*>( item );
|
||||||
|
existingLabels.insert( UnescapeString( power->GetValueFieldText( false ) ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::set<std::shared_ptr<BUS_ALIAS>> sheetAliases = screen->GetBusAliases();
|
std::set<std::shared_ptr<BUS_ALIAS>> sheetAliases = screen->GetBusAliases();
|
||||||
busAliases.insert( busAliases.end(), sheetAliases.begin(), sheetAliases.end() );
|
busAliases.insert( busAliases.end(), sheetAliases.begin(), sheetAliases.end() );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue