Skip to content
Permalink
Browse files

[composer] Follow up 2b3108f, fix calculation of bounding rect after …

…resizing composer shapes
  • Loading branch information
nyalldawson committed Apr 11, 2014
1 parent 9864bfc commit bead88a82862dfff1abb5d264db238ce2f7f0f37
Showing with 13 additions and 0 deletions.
  1. +8 −0 src/core/composer/qgscomposershape.cpp
  2. +5 −0 src/core/composer/qgscomposershape.h
@@ -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 );

0 comments on commit bead88a

Please sign in to comment.
You can’t perform that action at this time.