Eeschema: warn user that missing symbol link indicators cannot be edited.

This commit is contained in:
Wayne Stambaugh 2022-09-04 10:00:03 -04:00
parent 71724bea0c
commit 1079a4144a
1 changed files with 8 additions and 1 deletions

View File

@ -2074,9 +2074,16 @@ int SCH_EDITOR_CONTROL::EditWithSymbolEditor( const TOOL_EVENT& aEvent )
if( selection.GetSize() >= 1 )
symbol = (SCH_SYMBOL*) selection.Front();
if( !symbol || symbol->GetEditFlags() != 0 || symbol->IsMissingLibSymbol() )
if( !symbol || symbol->GetEditFlags() != 0 )
return 0;
if( symbol->IsMissingLibSymbol() )
{
m_frame->ShowInfoBarError( _( "Symbols with broken library symbol links cannot "
"be edited." ) );
return 0;
}
m_toolMgr->RunAction( ACTIONS::showSymbolEditor, true );
symbolEditor = (SYMBOL_EDIT_FRAME*) m_frame->Kiway().Player( FRAME_SCH_SYMBOL_EDITOR, false );