Fix names of added aliases
This commit is contained in:
parent
b907fb856d
commit
a41b2d6803
|
@ -332,10 +332,9 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::EditAliasOfPart( wxCommandEvent& aEvent )
|
||||||
if( dlg.ShowModal() != wxID_OK )
|
if( dlg.ShowModal() != wxID_OK )
|
||||||
return; // cancelled by user
|
return; // cancelled by user
|
||||||
|
|
||||||
aliasname = dlg.GetValue( );
|
aliasname = LIB_ID::FixIllegalChars( dlg.GetValue(), LIB_ID::ID_SCH );
|
||||||
aliasname.Replace( wxT( " " ), wxT( "_" ) );
|
|
||||||
|
|
||||||
if( checkNewAlias( aliasname) )
|
if( checkNewAlias( aliasname ) )
|
||||||
m_PartAliasListCtrl->SetString( sel, aliasname );
|
m_PartAliasListCtrl->SetString( sel, aliasname );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -349,8 +348,7 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::AddAliasOfPart( wxCommandEvent& event )
|
||||||
if( dlg.ShowModal() != wxID_OK )
|
if( dlg.ShowModal() != wxID_OK )
|
||||||
return; // cancelled by user
|
return; // cancelled by user
|
||||||
|
|
||||||
aliasname = dlg.GetValue( );
|
aliasname = LIB_ID::FixIllegalChars( dlg.GetValue(), LIB_ID::ID_SCH );
|
||||||
aliasname.Replace( wxT( " " ), wxT( "_" ) );
|
|
||||||
|
|
||||||
if( checkNewAlias( aliasname ) )
|
if( checkNewAlias( aliasname ) )
|
||||||
m_PartAliasListCtrl->Append( aliasname );
|
m_PartAliasListCtrl->Append( aliasname );
|
||||||
|
|
Loading…
Reference in New Issue