We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent f04abe0 commit ed1e19fCopy full SHA for ed1e19f
src/gui/qgsrubberband.cpp
@@ -412,7 +412,9 @@ void QgsRubberBand::paint( QPainter* p )
412
QList<QgsPoint>::const_iterator it = mPoints.at( i ).constBegin();
413
for ( ; it != mPoints.at( i ).constEnd(); ++it )
414
{
415
- pts.append( toCanvasCoordinates( QgsPoint( it->x() + mTranslationOffsetX, it->y() + mTranslationOffsetY ) ) - pos() );
+ const QPointF cur = toCanvasCoordinates( QgsPoint( it->x() + mTranslationOffsetX, it->y() + mTranslationOffsetY ) ) - pos();
416
+ if ( pts.empty() || std::abs( pts.back().x() - cur.x() ) > 1 || std::abs( pts.back().y() - cur.y() ) > 1 )
417
+ pts.append( cur );
418
}
419
420
switch ( mGeometryType )
0 commit comments