Limit leading space and line thicknesses - #34449
Conversation
📝 WalkthroughWalkthroughThe change adds page-aware clamping for segment positions after leading space is applied. It limits beam thickness to 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsLinked repositories: Public OSS repositories can only analyze public repositories installed in this organization. No linked repositories were analyzed; skipped 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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.
Inline comments:
In `@src/engraving/rendering/score/horizontalspacing.cpp`:
- Around line 294-297: Update the clamping block around
placedSegments.back().xPosInSystemCoords so ctx.xCur is synchronized with the
final clamped segment position before the segment width is added, ensuring
subsequent spacing uses the corrected horizontal coordinate.
In `@src/notationscene/widgets/editstyle.ui`:
- Around line 462-464: Update the style-edit dialog’s load/save handling for the
QDoubleSpinBox fields at the referenced properties, including staffLineWidth,
barWidth, doubleBarWidth, and endBarWidth. Ensure legacy values above their
declared maxima are not silently clamped by setValue() and overwritten on save;
preserve those values or apply an explicit migration before persistence. Keep
normal in-range UI behavior unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 30ba3d60-06d1-4347-9755-e2bc1ef0e197
📒 Files selected for processing (3)
src/engraving/rendering/score/horizontalspacing.cppsrc/notationscene/qml/MuseScore/NotationScene/styledialog/BeamsPage.qmlsrc/notationscene/widgets/editstyle.ui
Makes some progress on #25799
This PR adds a check to
HorizontalSpacing::spaceSegmentsso that segments cannot be moved to the left off the page using a negative leading space. It also lowers the maximums on beam and staff line thicknesses (down to the thickness where the lines would overlap), as well as barline thickness.