Generate safe alias names in case of name collisions
Duplicated aliases were given " (copy x)" suffix. There are two problems: aliases cannot contain spaces and the string was translatable which could create more issues. Now duplicated aliases receive "_x" suffix.
This commit is contained in:
parent
9df938484a
commit
1d48fd28e3
|
@ -440,9 +440,7 @@ void LIB_EDIT_FRAME::fixDuplicateAliases( LIB_PART* aPart, const wxString& aLibr
|
|||
|
||||
while( m_libMgr->PartExists( newName, aLibrary ) )
|
||||
{
|
||||
wxString suffix = ( sfx == 0 ) ? wxT( " (copy)" )
|
||||
: wxString::Format( _( " (copy %d)" ), sfx );
|
||||
newName = alias->GetName() + suffix;
|
||||
newName = wxString::Format( "%s_%d", alias->GetName(), sfx );
|
||||
++sfx;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue