diff --git a/source/layout/fragmentbuilder.cpp b/source/layout/fragmentbuilder.cpp index 8e1c277..280db04 100644 --- a/source/layout/fragmentbuilder.cpp +++ b/source/layout/fragmentbuilder.cpp @@ -11,17 +11,17 @@ PageBuilder::PageBuilder(const Book* book) float PageBuilder::applyFragmentBreakBefore(const BoxFrame* child, float offset) { - return 0.f; + return offset; } float PageBuilder::applyFragmentBreakAfter(const BoxFrame* child, float offset) { - return 0.f; + return offset; } float PageBuilder::applyFragmentBreakInside(const BoxFrame* child, float offset) { - return 0.f; + return offset; } float PageBuilder::fragmentHeightForOffset(float offset) const diff --git a/source/plutobook.cpp b/source/plutobook.cpp index c541385..8193b9c 100644 --- a/source/plutobook.cpp +++ b/source/plutobook.cpp @@ -571,7 +571,7 @@ Document* Book::layoutIfNeeded() const { auto document = buildIfNeeded(); if(document && m_needsLayout) { - if(m_mediaType != MediaType::Print) { + if(m_mediaType == MediaType::Print) { PageBuilder builder(this); document->layout(&builder); } else {