Skip to content
Permalink
Browse files
Add pen width to rubberband bounding rect
  • Loading branch information
m-kuhn committed Dec 26, 2012
1 parent f232896 commit 90c571da9026f5c89487c4b8bf8fb87c73c350fc
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/gui/qgsrubberband.cpp
@@ -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 );
}
}

0 comments on commit 90c571d

Please sign in to comment.