Skip to content

Commit

Permalink
Use a cosmetic pen for snap lines to prevent lines scaling (fix #7524)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 17, 2013
1 parent d888728 commit 55556fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/composer/qgscomposition.cpp
Expand Up @@ -1279,7 +1279,9 @@ QGraphicsLineItem* QgsComposition::addSnapLine()
QGraphicsLineItem* item = new QGraphicsLineItem();
QPen linePen( Qt::SolidLine );
linePen.setColor( Qt::red );
linePen.setWidthF( 0.5 );
// use a pen width of 0, since this activates a cosmetic pen
// which doesn't scale with the composer and keeps a constant size
linePen.setWidthF( 0 );
item->setPen( linePen );
item->setZValue( 100 );
addItem( item );
Expand Down

0 comments on commit 55556fc

Please sign in to comment.