Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[composer] Make sure rulers are updated when paper size changes
  • Loading branch information
nyalldawson committed Dec 29, 2013
1 parent 097a195 commit d79b12b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/composer/qgscomposer.cpp
Expand Up @@ -565,6 +565,10 @@ void QgsComposer::connectSlots()
connect( mComposition, SIGNAL( composerShapeAdded( QgsComposerShape* ) ), this, SLOT( addComposerShape( QgsComposerShape* ) ) );
connect( mComposition, SIGNAL( composerTableAdded( QgsComposerAttributeTable* ) ), this, SLOT( addComposerTable( QgsComposerAttributeTable* ) ) );
connect( mComposition, SIGNAL( itemRemoved( QgsComposerItem* ) ), this, SLOT( deleteItem( QgsComposerItem* ) ) );
connect( mComposition, SIGNAL( paperSizeChanged() ), mHorizontalRuler, SLOT( update() ) );
connect( mComposition, SIGNAL( paperSizeChanged() ), mVerticalRuler, SLOT( update() ) );
connect( mComposition, SIGNAL( nPagesChanged() ), mHorizontalRuler, SLOT( update() ) );
connect( mComposition, SIGNAL( nPagesChanged() ), mVerticalRuler, SLOT( update() ) );

//listen out for position updates from the QgsComposerView
connect( mView, SIGNAL( cursorPosChanged( QPointF ) ), this, SLOT( updateStatusCursorPos( QPointF ) ) );
Expand Down
1 change: 1 addition & 0 deletions src/core/composer/qgscomposition.cpp
Expand Up @@ -155,6 +155,7 @@ void QgsComposition::setPaperSize( double width, double height )
mPages.at( i )->setSceneRect( QRectF( 0, currentY, width, height ) );
currentY += ( height + mSpaceBetweenPages );
}
emit paperSizeChanged();
}

double QgsComposition::paperHeight() const
Expand Down

0 comments on commit d79b12b

Please sign in to comment.