Add specific warning for no symbol library selected.
Fixes https://gitlab.com/kicad/code/kicad/issues/7954
This commit is contained in:
parent
074f0432f0
commit
35d17929ff
|
@ -154,6 +154,13 @@ int SYMBOL_EDITOR_CONTROL::AddSymbol( const TOOL_EVENT& aEvent )
|
|||
const wxString& libName = sel.GetLibNickname();
|
||||
wxString msg;
|
||||
|
||||
if( libName.IsEmpty() )
|
||||
{
|
||||
msg.Printf( _( "No symbol library selected." ), libName );
|
||||
m_frame->ShowInfoBarError( msg );
|
||||
return 0;
|
||||
}
|
||||
|
||||
if( editFrame->GetLibManager().IsLibraryReadOnly( libName ) )
|
||||
{
|
||||
msg.Printf( _( "Symbol library '%s' is not writeable." ), libName );
|
||||
|
|
Loading…
Reference in New Issue