use floating point precision and use proper setFlags method (#8244)

This commit is contained in:
Denis Rouzaud 2018-10-19 08:18:42 -08:00 committed by GitHub
parent 7ad0dcfa71
commit dff0496961
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,7 +79,7 @@ void QgsAdvancedDigitizingCanvasItem::paint( QPainter *painter )
snapSegmentPix2 = toCanvasCoordinates( snappedSegment[1] );
}
painter->setRenderHints( QPainter::Antialiasing );
painter->setRenderHint( QPainter::Antialiasing );
painter->setCompositionMode( QPainter::CompositionMode_Difference );
// Draw point snap
@ -208,10 +208,8 @@ void QgsAdvancedDigitizingCanvasItem::paint( QPainter *painter )
}
if ( draw )
{
painter->drawLine( 0,
y,
boundingRect().width(),
y );
painter->drawLine( QPointF( 0, y ),
QPointF( boundingRect().width(), y ) );
}
}