Enforce symbol name not being empty

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15859
This commit is contained in:
Jon Evans 2023-10-31 22:11:46 -04:00
parent 24e613f60c
commit e14e7e0bd9
1 changed files with 6 additions and 0 deletions

View File

@ -315,6 +315,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();