Skip to content

Commit

Permalink
Merge pull request #22135 from wizofaus/clip_page_render_refix
Browse files Browse the repository at this point in the history
Fix #7819 - adjustment to previous page-clipping fix
  • Loading branch information
cbjeukendrup authored Oct 10, 2024
2 parents df36376 + 80ecffe commit 05934b3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/engraving/rendering/score/paint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ void Paint::paintScore(Painter* painter, Score* score, const IScoreRenderer::Pai

painter->beginObject("page_" + std::to_string(pi));

if (opt.isPrinting && painter->hasClipping()) {
// prevent elements from being drawn off the edge of the page (e.g. too many staves),
// for now only in "Publish" mode (opt.isPrinting == true)
painter->setClipRect(pageAbsRect.intersected(drawRect));
}

if (opt.isMultiPage) {
painter->translate(pagePos);
} else if (opt.trimMarginPixelSize >= 0) {
Expand Down

0 comments on commit 05934b3

Please sign in to comment.