Skip to content
Permalink
Browse files

[composer] Fix smart page breaks not being applied to html items when…

… first calculating new frames
  • Loading branch information
nyalldawson committed May 8, 2014
1 parent 0d38387 commit add7040a2f9b4939eafba75f9907f806a49d739e
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/core/composer/qgscomposermultiframe.cpp
@@ -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;
}
}

0 comments on commit add7040

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