Skip to content
Permalink
Browse files

Use a cosmetic pen for snap lines to prevent lines scaling (fix #7524)

  • Loading branch information
nyalldawson committed May 17, 2013
1 parent d888728 commit 55556fcdc05fde836cb93985a9979636c999ec32
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/core/composer/qgscomposition.cpp
@@ -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 );

0 comments on commit 55556fc

Please sign in to comment.
You can’t perform that action at this time.