Only convert references to KIIDs if the variable resolves.
Fixes https://gitlab.com/kicad/code/kicad/issues/2458
This commit is contained in:
parent
dbded3e5dc
commit
350696ecdd
|
@ -271,7 +271,11 @@ wxString convertReferencesToKIIDs( const wxString& aSource )
|
||||||
|
|
||||||
if( ref == refComponent->GetRef( &references[ jj ].GetSheetPath(), true ) )
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -368,7 +368,11 @@ wxString DIALOG_TEXT_PROPERTIES::convertReferencesToKIIDs( const wxString& aSour
|
||||||
{
|
{
|
||||||
if( mod->GetReference().CmpNoCase( ref ) == 0 )
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue