Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add pen width to rubberband bounding rect
  • Loading branch information
m-kuhn committed Dec 26, 2012
1 parent f232896 commit 90c571d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gui/qgsrubberband.cpp
Expand Up @@ -479,8 +479,9 @@ void QgsRubberBand::updateRect()
for ( ; it != mPoints.at( i ).constEnd(); ++it )
{
qreal s = ( mIconSize - 1 ) / 2;
QgsRectangle rect = QgsRectangle( it->x() + mTranslationOffsetX - s, it->y() + mTranslationOffsetY - s,
it->x() + mTranslationOffsetX + s, it->y() + mTranslationOffsetY + s );
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 90c571d

Please sign in to comment.