Separate LIB_PIN and SCH_PIN GetShownName/Number processing.

SCH_PIN wasn't handling the legacy empty string token (~), but
more importantly this will allow text variable resolution specific
to the schematic.

Fixes https://gitlab.com/kicad/code/kicad/issues/8625
This commit is contained in:
Jeff Young
2021-06-17 10:52:46 +01:00
parent b10f156dd0
commit 0484ca5564
8 changed files with 44 additions and 25 deletions
+8 -4
View File
@@ -531,7 +531,7 @@ void BACK_ANNOTATE::processNetNameChange( const wxString& aRef, SCH_PIN* aPin,
msg.Printf( _( "Change %s pin %s net label from '%s' to '%s'." ),
aRef,
aPin->GetNumber(),
aPin->GetShownNumber(),
aOldName,
aNewName );
@@ -554,15 +554,19 @@ void BACK_ANNOTATE::processNetNameChange( const wxString& aRef, SCH_PIN* aPin,
if( schPin->IsPowerConnection() )
{
msg.Printf( _( "Net %s cannot be changed to '%s' because it is driven by a power "
"pin." ), aOldName, aNewName );
msg.Printf( _( "Net %s cannot be changed to %s because it is driven by a power pin." ),
aOldName,
aNewName );
m_reporter.ReportHead( msg, RPT_SEVERITY_ERROR );
break;
}
++m_changesCount;
msg.Printf( _( "Add label '%s' to %s pin %s net." ), aNewName, aRef, aPin->GetNumber() );
msg.Printf( _( "Add label '%s' to %s pin %s net." ),
aNewName,
aRef,
aPin->GetShownNumber() );
if( !m_dryRun )
{