Convert between refs and KIIDs in Symbol Properties.

This commit is contained in:
Jeff Young 2024-01-24 11:00:45 +00:00
parent d50e0811fb
commit 6407576cb9
1 changed files with 8 additions and 1 deletions

View File

@ -452,6 +452,8 @@ bool DIALOG_SYMBOL_PROPERTIES::TransferDataToWindow()
// change offset to be symbol-relative
field.Offset( -m_symbol->GetPosition() );
field.SetText( m_symbol->Schematic()->ConvertKIIDsToRefs( field.GetText() ) );
defined.insert( field.GetName() );
m_fields->push_back( field );
}
@ -730,7 +732,12 @@ bool DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow()
// change all field positions from relative to absolute
for( unsigned i = 0; i < m_fields->size(); ++i )
m_fields->at( i ).Offset( m_symbol->GetPosition() );
{
SCH_FIELD& field = m_fields->at( i );
field.Offset( m_symbol->GetPosition() );
field.SetText( m_symbol->Schematic()->ConvertRefsToKIIDs( field.GetText() ) );
}
SCH_FIELDS& fields = m_symbol->GetFields();