bugfix: Avoid rendering component preview if either dimension is 0 (eeschema).
This commit is contained in:
parent
6aff74665a
commit
ec1d2128bd
|
@ -346,6 +346,13 @@ void DIALOG_CHOOSE_COMPONENT::renderPreview( LIB_PART* aComponent, int aUnit )
|
||||||
NEGATE( offset.x );
|
NEGATE( offset.x );
|
||||||
NEGATE( offset.y );
|
NEGATE( offset.y );
|
||||||
|
|
||||||
|
// Avoid rendering when either dimension is zero
|
||||||
|
int width, height;
|
||||||
|
|
||||||
|
dc.GetSize( &width, &height );
|
||||||
|
if( !width || !height )
|
||||||
|
return;
|
||||||
|
|
||||||
aComponent->Draw( NULL, &dc, offset, aUnit, m_deMorganConvert, GR_COPY,
|
aComponent->Draw( NULL, &dc, offset, aUnit, m_deMorganConvert, GR_COPY,
|
||||||
UNSPECIFIED_COLOR, DefaultTransform, true, true, false );
|
UNSPECIFIED_COLOR, DefaultTransform, true, true, false );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue