Show infobar error when asking for empty datasheet.
Fixes https://gitlab.com/kicad/code/kicad/issues/8260
This commit is contained in:
parent
25e2f35308
commit
620aa315f6
|
@ -492,7 +492,9 @@ int EE_INSPECTION_TOOL::ShowDatasheet( const TOOL_EVENT& aEvent )
|
|||
datasheet = component->GetField( DATASHEET_FIELD )->GetText();
|
||||
}
|
||||
|
||||
if( !datasheet.IsEmpty() && datasheet != wxT( "~" ) )
|
||||
if( datasheet.IsEmpty() || datasheet == wxT( "~" ) )
|
||||
m_frame->ShowInfoBarError( _( "No datasheet defined." ) );
|
||||
else
|
||||
GetAssociatedDocument( m_frame, datasheet, &m_frame->Prj() );
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue