diff --git a/eeschema/dialogs/dialog_edit_label.cpp b/eeschema/dialogs/dialog_edit_label.cpp index 6efcca77b9..e843522a36 100644 --- a/eeschema/dialogs/dialog_edit_label.cpp +++ b/eeschema/dialogs/dialog_edit_label.cpp @@ -271,7 +271,11 @@ wxString convertReferencesToKIIDs( const wxString& aSource ) if( ref == refComponent->GetRef( &references[ jj ].GetSheetPath(), true ) ) { - token = refComponent->m_Uuid.AsString() + ":" + remainder; + wxString test( remainder ); + + if( refComponent->ResolveTextVar( &test ) ) + token = refComponent->m_Uuid.AsString() + ":" + remainder; + break; } } diff --git a/pcbnew/dialogs/dialog_text_properties.cpp b/pcbnew/dialogs/dialog_text_properties.cpp index 779ae6c845..5dc815014c 100644 --- a/pcbnew/dialogs/dialog_text_properties.cpp +++ b/pcbnew/dialogs/dialog_text_properties.cpp @@ -368,7 +368,11 @@ wxString DIALOG_TEXT_PROPERTIES::convertReferencesToKIIDs( const wxString& aSour { if( mod->GetReference().CmpNoCase( ref ) == 0 ) { - token = mod->m_Uuid.AsString() + ":" + remainder; + wxString test( remainder ); + + if( mod->ResolveTextVar( &test ) ) + token = mod->m_Uuid.AsString() + ":" + remainder; + break; } }