Skip to content

Commit

Permalink
Fix for a2b2e16
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Apr 29, 2013
1 parent a2b2e16 commit 27c5b93
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gui/qgsrubberband.cpp
Expand Up @@ -484,6 +484,9 @@ void QgsRubberBand::updateRect()
{
return;
}
qreal s = ( mIconSize - 1 ) / 2;
qreal p = mWidth;

QgsRectangle r ( it->x() + mTranslationOffsetX - s - p, it->y() + mTranslationOffsetY - s - p,
it->x() + mTranslationOffsetX + s + p, it->y() + mTranslationOffsetY + s + p );

Expand All @@ -492,8 +495,6 @@ void QgsRubberBand::updateRect()
QList<QgsPoint>::const_iterator it = mPoints.at( i ).constBegin();
for ( ; it != mPoints.at( i ).constEnd(); ++it )
{
qreal s = ( mIconSize - 1 ) / 2;
qreal p = mWidth;
QgsRectangle rect = QgsRectangle( it->x() + mTranslationOffsetX - s - p, it->y() + mTranslationOffsetY - s - p,
it->x() + mTranslationOffsetX + s + p, it->y() + mTranslationOffsetY + s + p );
r.combineExtentWith( &rect );
Expand Down

0 comments on commit 27c5b93

Please sign in to comment.