Skip to content
Permalink
Browse files

Recalculate content if one of the frames changes size

  • Loading branch information
mhugent committed Jul 25, 2012
1 parent c01edd4 commit 0ed3d4772c1bd1f52da3752665c70739a2481eba
Showing with 8 additions and 1 deletion.
  1. +6 −0 src/core/composer/qgscomposermultiframe.cpp
  2. +2 −1 src/core/composer/qgscomposermultiframe.h
@@ -37,3 +37,9 @@ void QgsComposerMultiFrame::recalculateFrameSizes()
item->setContentSection( QRectF( 0, 0, item->rect().width(), item->rect().height() ) );
}
}

void QgsComposerMultiFrame::addFrame( QgsComposerFrame* frame )
{
mFrameItems.push_back( frame );
QObject::connect( frame, SIGNAL( sizeChanged() ), this, SLOT( recalculateFrameSizes() ) );
}
@@ -41,12 +41,13 @@ class QgsComposerMultiFrame: public QObject
virtual QSizeF totalSize() const = 0;
virtual void render( QPainter* p, const QRectF& renderExtent ) = 0;

void addFrame( QgsComposerFrame* frame ) { mFrameItems.push_back( frame ); }
void addFrame( QgsComposerFrame* frame );

protected:
QgsComposition* mComposition;
QList<QgsComposerFrame*> mFrameItems;

protected slots:
void recalculateFrameSizes();

private:

0 comments on commit 0ed3d47

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