Eeschema: fix alt mode resetting on symbol update

GetName is the alt name if it's set, so use GetBaseName.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/21439
This commit is contained in:
John Beard
2025-08-07 01:18:34 +08:00
parent 8023227829
commit a8d69c856f
+2 -2
View File
@@ -828,8 +828,8 @@ int DIALOG_CHANGE_SYMBOLS::processSymbols( SCH_COMMIT* aCommit,
// name which causes library symbol comparison errors. Clear the alternate pin
// name in this case even if the reset option is not checked. Also clear the
// alternate pin name if it no longer exists in the alternate pin map.
if( m_resetAlternatePin->IsChecked() || ( pin->GetAlt() == pin->GetName() )
|| ( pin->GetAlternates().count( pin->GetAlt() ) == 0 ) )
if( m_resetAlternatePin->IsChecked() || ( pin->GetAlt() == pin->GetBaseName() )
|| ( pin->GetAlternates().count( pin->GetAlt() ) == 0 ) )
pin->SetAlt( wxEmptyString );
}
}