mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Add pen width to rubberband bounding rect
This commit is contained in:
parent
f2328962df
commit
90c571da90
@ -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 );
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user