Skip to content

Commit 55556fc

Browse files
committed
Use a cosmetic pen for snap lines to prevent lines scaling (fix #7524)
1 parent d888728 commit 55556fc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/core/composer/qgscomposition.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1279,7 +1279,9 @@ QGraphicsLineItem* QgsComposition::addSnapLine()
12791279
QGraphicsLineItem* item = new QGraphicsLineItem();
12801280
QPen linePen( Qt::SolidLine );
12811281
linePen.setColor( Qt::red );
1282-
linePen.setWidthF( 0.5 );
1282+
// use a pen width of 0, since this activates a cosmetic pen
1283+
// which doesn't scale with the composer and keeps a constant size
1284+
linePen.setWidthF( 0 );
12831285
item->setPen( linePen );
12841286
item->setZValue( 100 );
12851287
addItem( item );

0 commit comments

Comments
 (0)