Skip to content

Fix page locks ending on frames - #34505

Open
miiizen wants to merge 1 commit into
musescore:mainfrom
miiizen:34490-pageLockFrameFix
Open

Fix page locks ending on frames#34505
miiizen wants to merge 1 commit into
musescore:mainfrom
miiizen:34490-pageLockFrameFix

Conversation

@miiizen

@miiizen miiizen commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Resolves: #34490
The changes in pagelayout.cpp fix the linked issue, the changes in system.cpp make sure the page lock indicator gets drawn when the system is a VBox.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/engraving/rendering/score/pagelayout.cpp (1)

259-259: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a regression test for page locks ending at a vertical frame.

Verify that the page-lock boundary ends on the current page and does not include the following page.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/engraving/rendering/score/pagelayout.cpp` at line 259, Add a regression
test covering a page lock that ends at a vertical frame, exercising the
pagelayout flow around ctx.state().prevSystem()->last(). Assert that the lock
boundary remains on the current page and does not include the subsequent page.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/engraving/rendering/score/pagelayout.cpp`:
- Line 259: Add a regression test covering a page lock that ends at a vertical
frame, exercising the pagelayout flow around ctx.state().prevSystem()->last().
Assert that the lock boundary remains on the current page and does not include
the subsequent page.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e0db6ae4-e50a-4361-b073-22adb3db9373

📥 Commits

Reviewing files that changed from the base of the PR and between 106e63b and 79f31ea.

📒 Files selected for processing (3)
  • src/engraving/dom/system.cpp
  • src/engraving/rendering/score/pagelayout.cpp
  • vtest/scores/page-locks-1.mscz

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Page-lock processing now scans the page-lock indicator before the vbox early return. Page-layout collection now uses the previous system’s final MeasureBase when it determines page-break and page-lock boundaries.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description states the issue and summarizes the two related code changes, but it omits the required checklist items. Add and complete the required checklist, including CLA, testing, coding rules, commit references, unnecessary changes, and test coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: fixing page locks that end on frames.
Linked Issues check ✅ Passed The changes address issue #34490 by correcting page-lock boundaries and processing page-lock indicators for systems containing a VBox.
Out of Scope Changes check ✅ Passed Both modified files contain changes directly related to fixing page-lock behavior when a page ends with a vertical frame.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Review ran into problems

🔥 Problems

Linked repositories: Public OSS repositories can only analyze public repositories installed in this organization. No linked repositories were analyzed; skipped musescore/muse_framework.git.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect Page lock behaviour when page ends with vertical frame

2 participants