Enforce symbol name not being empty

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15859


(cherry picked from commit e14e7e0bd9)
This commit is contained in:
Jon Evans 2023-10-31 22:11:46 -04:00
parent e9b7737692
commit 01c5fab84b
1 changed files with 6 additions and 0 deletions

View File

@ -361,6 +361,12 @@ bool DIALOG_LIB_SYMBOL_PROPERTIES::TransferDataFromWindow()
wxString newName = EscapeString( m_SymbolNameCtrl->GetValue(), CTX_LIBID );
wxString oldName = m_libEntry->GetName();
if( newName.IsEmpty() )
{
wxMessageBox( _( "Symbol must have a name." ) );
return false;
}
if( oldName != newName )
{
wxString libName = m_Parent->GetCurLib();