7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-18 16:39:17 +00:00

Use a white background for "No symbol selected" message.

This commit is contained in:
Jeff Young 2018-08-05 16:00:17 +01:00
parent 0fbe702043
commit 9e84c3fc3b

View File

@ -519,13 +519,6 @@ void DIALOG_CHOOSE_COMPONENT::RenderPreview( LIB_PART* aComponent, int aUnit )
if( dc_size.x == 0 || dc_size.y == 0 )
return;
if( !aComponent ) // display a tooltip
{
wxString tooltip = _( "No symbol selected" );
GRDrawWrappedText( dc, tooltip );
return;
}
GRResetPenAndBrush( &dc );
COLOR4D bgColor = m_parent->GetDrawBgColor();
@ -533,6 +526,13 @@ void DIALOG_CHOOSE_COMPONENT::RenderPreview( LIB_PART* aComponent, int aUnit )
dc.SetBackground( wxBrush( bgColor.ToColour() ) );
dc.Clear();
if( !aComponent ) // display a tooltip
{
wxString tooltip = _( "No symbol selected" );
GRDrawWrappedText( dc, tooltip );
return;
}
int unit = aUnit > 0 ? aUnit : 1;
int convert = m_deMorganConvert > 0 ? m_deMorganConvert : 1;