Skip to content

Commit 020eb60

Browse files
committedFeb 13, 2014
[composer] Make zoom full action actually zoom to all items, not just page bounds
1 parent 9e948df commit 020eb60

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed
 

‎src/app/composer/qgscomposer.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -957,14 +957,7 @@ void QgsComposer::zoomFull( void )
957957
{
958958
if ( mView )
959959
{
960-
int nPages = mComposition->numPages();
961-
if ( nPages < 1 )
962-
{
963-
return;
964-
}
965-
double height = mComposition->paperHeight() * nPages + mComposition->spaceBetweenPages() * ( nPages - 1 );
966-
mView->fitInView( 0, 0, mComposition->paperWidth() + 1, height + 1, Qt::KeepAspectRatio );
967-
mView->centerOn(( mComposition->paperWidth() + 1 ) / 2, ( height + 1 ) / 2 );
960+
mView->fitInView( mComposition->sceneRect(), Qt::KeepAspectRatio );
968961
}
969962
}
970963

0 commit comments

Comments
 (0)
Please sign in to comment.