Skip to content

Commit

Permalink
Use non cosmetic pens
Browse files Browse the repository at this point in the history
For Libraries Browser and shapes inside component when thickness is greater than 2
  • Loading branch information
adeas31 committed Dec 22, 2017
1 parent a63f2df commit 4b1305c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion OMEdit/OMEditGUI/Annotations/ShapeAnnotation.cpp
Expand Up @@ -506,8 +506,11 @@ void ShapeAnnotation::applyLinePattern(QPainter *painter)
pen.setCosmetic(true);
/* Ticket #2272, Ticket #2268.
* If thickness is greater than 2 then don't make the pen cosmetic since cosmetic pens don't change the width with respect to zoom.
* Use non cosmetic pens for Libraries Browser and shapes inside component when thickness is greater than 2.
*/
if (mpGraphicsView && mpGraphicsView->isRenderingLibraryPixmap() && thickness > 2) {
if (thickness > 2
&& ((mpGraphicsView && mpGraphicsView->isRenderingLibraryPixmap())
|| mpParentComponent)) {
pen.setCosmetic(false);
}
// if thickness is greater than 1 pixel then use antialiasing.
Expand Down

0 comments on commit 4b1305c

Please sign in to comment.