mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
[composer] Follow up 2b3108f9ae, fix calculation of bounding rect after resizing composer shapes
This commit is contained in:
parent
9864bfc11b
commit
bead88a828
@ -349,3 +349,11 @@ void QgsComposerShape::updateBoundingRect()
|
||||
mCurrentRectangle = rectangle;
|
||||
}
|
||||
}
|
||||
|
||||
void QgsComposerShape::setSceneRect( const QRectF& rectangle )
|
||||
{
|
||||
// Reimplemented from QgsComposerItem as we need to call updateBoundingRect after the shape's size changes
|
||||
QgsComposerItem::setSceneRect( rectangle );
|
||||
updateBoundingRect();
|
||||
update();
|
||||
}
|
||||
|
@ -84,6 +84,11 @@ class CORE_EXPORT QgsComposerShape: public QgsComposerItem
|
||||
@note this function was added in version 2.3*/
|
||||
QRectF boundingRect() const;
|
||||
|
||||
/**Sets new scene rectangle bounds and recalculates hight and extent. Reimplemented from
|
||||
* QgsComposerItem as it needs to call updateBoundingRect after the shape's size changes
|
||||
*/
|
||||
void setSceneRect( const QRectF& rectangle );
|
||||
|
||||
protected:
|
||||
/* reimplement drawFrame, since it's not a rect, but a custom shape */
|
||||
virtual void drawFrame( QPainter* p );
|
||||
|
Loading…
x
Reference in New Issue
Block a user