mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -05:00
Fix invalid calculation of rubberband boundingRect
This commit is contained in:
parent
5e6ca2efac
commit
d43d8bf597
@ -547,7 +547,16 @@ void QgsRubberBand::updateRect()
|
||||
QgsPoint p( it->x() + mTranslationOffsetX, it->y() + mTranslationOffsetY );
|
||||
p = m2p.transform( p );
|
||||
QgsRectangle rect( p.x() - w, p.y() - w, p.x() + w, p.y() + w );
|
||||
r.combineExtentWith( &rect );
|
||||
|
||||
if ( r.isEmpty() )
|
||||
{
|
||||
// Get rectangle of the first point
|
||||
r = rect;
|
||||
}
|
||||
else
|
||||
{
|
||||
r.combineExtentWith( &rect );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user