Skip to content

Commit

Permalink
[composer] Fix smart page breaks not being applied to html items when…
Browse files Browse the repository at this point in the history
… first calculating new frames
  • Loading branch information
nyalldawson committed May 8, 2014
1 parent 0d38387 commit add7040
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/core/composer/qgscomposermultiframe.cpp
Expand Up @@ -146,12 +146,15 @@ void QgsComposerMultiFrame::recalculateFrameSizes()
if ( mResizeMode == RepeatOnEveryPage )
{
newFrame->setContentSection( QRectF( 0, 0, newFrame->rect().width(), newFrame->rect().height() ) );
currentY += frameHeight;
}
else
{
newFrame->setContentSection( QRectF( 0, currentY, newFrame->rect().width(), newFrame->rect().height() ) );
double contentHeight = findNearbyPageBreak( currentY + newFrame->rect().height() ) - currentY;
newFrame->setContentSection( QRectF( 0, currentY, newFrame->rect().width(), contentHeight ) );
currentY += contentHeight;
}
currentY += frameHeight;

currentItem = newFrame;
}
}
Expand Down

0 comments on commit add7040

Please sign in to comment.