Show infobar error when asking for empty datasheet.

Fixes https://gitlab.com/kicad/code/kicad/issues/8260
This commit is contained in:
Jeff Young 2021-04-21 15:21:34 +01:00
parent 25e2f35308
commit 620aa315f6
1 changed files with 3 additions and 1 deletions

View File

@ -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;