Resolve text vars when exporting IDF.
Fixes https://gitlab.com/kicad/code/kicad/issues/5287
This commit is contained in:
parent
929528a72c
commit
6598ad81e7
|
@ -278,11 +278,11 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule,
|
|||
IDF3_BOARD& aIDFBoard )
|
||||
{
|
||||
// Reference Designator
|
||||
std::string crefdes = TO_UTF8( aModule->GetReference() );
|
||||
std::string crefdes = TO_UTF8( aModule->Reference().GetShownText() );
|
||||
|
||||
if( crefdes.empty() || !crefdes.compare( "~" ) )
|
||||
{
|
||||
std::string cvalue = TO_UTF8( aModule->GetValue() );
|
||||
std::string cvalue = TO_UTF8( aModule->Value().GetShownText() );
|
||||
|
||||
// if both the RefDes and Value are empty or set to '~' the board owns the part,
|
||||
// otherwise associated parts of the module must be marked NOREFDES.
|
||||
|
@ -421,7 +421,7 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule,
|
|||
|
||||
if( refdes.empty() )
|
||||
{
|
||||
refdes = TO_UTF8( aModule->GetReference() );
|
||||
refdes = TO_UTF8( aModule->Reference().GetShownText() );
|
||||
|
||||
// NOREFDES cannot be used or else the software gets confused
|
||||
// when writing out the placement data due to conflicting
|
||||
|
@ -564,8 +564,6 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule,
|
|||
comp->AddOutlineData( data );
|
||||
++sM;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue