Fix names of added aliases

This commit is contained in:
Maciej Suminski 2018-04-13 14:24:11 +02:00
parent b907fb856d
commit a41b2d6803
1 changed files with 3 additions and 5 deletions

View File

@ -332,10 +332,9 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::EditAliasOfPart( wxCommandEvent& aEvent )
if( dlg.ShowModal() != wxID_OK )
return; // cancelled by user
aliasname = dlg.GetValue( );
aliasname.Replace( wxT( " " ), wxT( "_" ) );
aliasname = LIB_ID::FixIllegalChars( dlg.GetValue(), LIB_ID::ID_SCH );
if( checkNewAlias( aliasname) )
if( checkNewAlias( aliasname ) )
m_PartAliasListCtrl->SetString( sel, aliasname );
}
@ -349,8 +348,7 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::AddAliasOfPart( wxCommandEvent& event )
if( dlg.ShowModal() != wxID_OK )
return; // cancelled by user
aliasname = dlg.GetValue( );
aliasname.Replace( wxT( " " ), wxT( "_" ) );
aliasname = LIB_ID::FixIllegalChars( dlg.GetValue(), LIB_ID::ID_SCH );
if( checkNewAlias( aliasname ) )
m_PartAliasListCtrl->Append( aliasname );