Symbol Fields Table: make sure power symbols don't get added by commits
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17544
This commit is contained in:
parent
a81891053e
commit
52f9060b3b
|
@ -2220,6 +2220,10 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnSchItemsAdded( SCHEMATIC& aSch,
|
||||||
{
|
{
|
||||||
SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( item );
|
SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( item );
|
||||||
|
|
||||||
|
// Don't add power symbols
|
||||||
|
if( !symbol->IsMissingLibSymbol() && symbol->IsPower() )
|
||||||
|
continue;
|
||||||
|
|
||||||
// Add all fields again in case this symbol has a new one
|
// Add all fields again in case this symbol has a new one
|
||||||
for( SCH_FIELD& field : symbol->GetFields() )
|
for( SCH_FIELD& field : symbol->GetFields() )
|
||||||
AddField( field.GetCanonicalName(), field.GetName(), true, false, true );
|
AddField( field.GetCanonicalName(), field.GetName(), true, false, true );
|
||||||
|
@ -2287,6 +2291,10 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnSchItemsChanged( SCHEMATIC& aSch
|
||||||
{
|
{
|
||||||
SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( item );
|
SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( item );
|
||||||
|
|
||||||
|
// Don't add power symbols
|
||||||
|
if( !symbol->IsMissingLibSymbol() && symbol->IsPower() )
|
||||||
|
continue;
|
||||||
|
|
||||||
// Add all fields again in case this symbol has a new one
|
// Add all fields again in case this symbol has a new one
|
||||||
for( SCH_FIELD& field : symbol->GetFields() )
|
for( SCH_FIELD& field : symbol->GetFields() )
|
||||||
AddField( field.GetCanonicalName(), field.GetName(), true, false, true );
|
AddField( field.GetCanonicalName(), field.GetName(), true, false, true );
|
||||||
|
|
Loading…
Reference in New Issue