Skip to content

Commit

Permalink
Fix #7819 - adjustment to previous page-clipping fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wizofaus committed Sep 23, 2024
1 parent 090793d commit 16db424
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 (painter->hasClipping() && (drawRect.top() < pageAbsRect.top() || drawRect.bottom() > pageAbsRect.bottom()
|| drawRect.left() < pageAbsRect.left() || drawRect.right() > pageAbsRect.right())) {
// prevent elements from being drawn off the edge of the page (e.g. too many staves)
painter->setClipRect(pageAbsRect.intersected(drawRect));
}

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

0 comments on commit 16db424

Please sign in to comment.