Skip to content
Permalink
Browse files

fix #4819

improves rendering speed of complex rubberbands
  • Loading branch information
vmora authored and m-kuhn committed Jul 18, 2013
1 parent f04abe0 commit ed1e19f984a278b35e2262d0811e31ebd9e7597e
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/gui/qgsrubberband.cpp
@@ -412,7 +412,9 @@ void QgsRubberBand::paint( QPainter* p )
QList<QgsPoint>::const_iterator it = mPoints.at( i ).constBegin();
for ( ; it != mPoints.at( i ).constEnd(); ++it )
{
pts.append( toCanvasCoordinates( QgsPoint( it->x() + mTranslationOffsetX, it->y() + mTranslationOffsetY ) ) - pos() );
const QPointF cur = toCanvasCoordinates( QgsPoint( it->x() + mTranslationOffsetX, it->y() + mTranslationOffsetY ) ) - pos();
if ( pts.empty() || std::abs( pts.back().x() - cur.x() ) > 1 || std::abs( pts.back().y() - cur.y() ) > 1 )
pts.append( cur );
}

switch ( mGeometryType )

0 comments on commit ed1e19f

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