Created
March 30, 2015 15:05
-
-
Save alexisvl/fdcd6f06437c3887e7c4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/eeschema/dialogs/dialog_choose_component.cpp b/eeschema/dialogs/dialog_choose_component.cpp | |
index b16a7a9..7f88dbc 100644 | |
--- a/eeschema/dialogs/dialog_choose_component.cpp | |
+++ b/eeschema/dialogs/dialog_choose_component.cpp | |
@@ -346,6 +346,12 @@ void DIALOG_CHOOSE_COMPONENT::renderPreview( LIB_PART* aComponent, int aUnit ) | |
NEGATE( offset.x ); | |
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, | |
UNSPECIFIED_COLOR, DefaultTransform, true, true, false ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment