Skip to content

Commit dff0496

Browse files
authored
use floating point precision and use proper setFlags method (#8244)
1 parent 7ad0dcf commit dff0496

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/gui/qgsadvanceddigitizingcanvasitem.cpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void QgsAdvancedDigitizingCanvasItem::paint( QPainter *painter )
7979
snapSegmentPix2 = toCanvasCoordinates( snappedSegment[1] );
8080
}
8181

82-
painter->setRenderHints( QPainter::Antialiasing );
82+
painter->setRenderHint( QPainter::Antialiasing );
8383
painter->setCompositionMode( QPainter::CompositionMode_Difference );
8484

8585
// Draw point snap
@@ -208,10 +208,8 @@ void QgsAdvancedDigitizingCanvasItem::paint( QPainter *painter )
208208
}
209209
if ( draw )
210210
{
211-
painter->drawLine( 0,
212-
y,
213-
boundingRect().width(),
214-
y );
211+
painter->drawLine( QPointF( 0, y ),
212+
QPointF( boundingRect().width(), y ) );
215213
}
216214
}
217215

0 commit comments

Comments
 (0)