Don't display legacy placeholder for empty string ("~").

This commit is contained in:
Jeff Young 2021-06-12 18:58:15 +01:00
parent db8cbad2d7
commit ceb23c3aac
2 changed files with 10 additions and 2 deletions

View File

@ -148,7 +148,11 @@ wxString SCH_FIELD::GetShownText( int aDepth ) const
bool processTextVars = false; bool processTextVars = false;
wxString text = EDA_TEXT::GetShownText( &processTextVars ); wxString text = EDA_TEXT::GetShownText( &processTextVars );
if( processTextVars ) if( text == "~" ) // Legacy placeholder for empty string
{
text = "";
}
else if( processTextVars )
{ {
if( Schematic() ) if( Schematic() )
project = &Schematic()->Prj(); project = &Schematic()->Prj();

View File

@ -618,7 +618,11 @@ wxString SCH_TEXT::GetShownText( int aDepth ) const
bool processTextVars = false; bool processTextVars = false;
wxString text = EDA_TEXT::GetShownText( &processTextVars ); wxString text = EDA_TEXT::GetShownText( &processTextVars );
if( processTextVars ) if( text == "~" ) // Legacy placeholder for empty string
{
text = "";
}
else if( processTextVars )
{ {
wxCHECK_MSG( Schematic(), wxEmptyString, "No parent SCHEMATIC set for SCH_TEXT!" ); wxCHECK_MSG( Schematic(), wxEmptyString, "No parent SCHEMATIC set for SCH_TEXT!" );