Allow melismas across rests and fix lyrics crashes#34013
Conversation
3ee2443 to
a030631
Compare
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughA Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant TextBase
participant Score
participant TransactionManager
participant UndoableTransaction
TextBase->>Score: endCmd(true, false, true)
Score->>TransactionManager: endTransaction(true, false, true)
TransactionManager->>UndoableTransaction: unwind(false)
UndoableTransaction-->>TransactionManager: rollback without cleanup
TransactionManager-->>Score: return
Score-->>TextBase: continue deferred deletion
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 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 |
This comment was marked as resolved.
This comment was marked as resolved.
Backport of musescore#34013, commit 1 Co-Authored-By: ajuncosa <59970392+ajuncosa@users.noreply.github.com>
Backport of musescore#34013, commit 1 Co-Authored-By: ajuncosa <59970392+ajuncosa@users.noreply.github.com>
8cb0445 to
c22fbd2
Compare
|
@ajuncosa When closing the input field after creating extenders, the syllable may jump to an incorrect vertical position. This corrects itself upon relayout. Screen.Recording.2026-07-03.at.11.16.28.mov |
Backport of musescore#34013, commit 1 Co-Authored-By: ajuncosa <59970392+ajuncosa@users.noreply.github.com>
134cc21 to
c4cd870
Compare
Backport of musescore#34013, commit 1 Co-Authored-By: ajuncosa <59970392+ajuncosa@users.noreply.github.com>
|
I built this PR locally on Linux (Qt, Debug) and manually tested the lyrics fixes:
Both scenarios that previously reproduced the problems now behave correctly. Thanks for the fix! |
c43105b to
ff387d5
Compare
|
This PR also partially fixes #31986. The second case with the project file from Musescore 4.6.5 still crashes. |
…leTransaction::unwind
…pty lyrics text input (after a dash or melisma line)
…ing an empty lyrics text input (after a dash or melisma line)" This reverts commit 1216b4d.
… segments will be properly calculated with mmrest in voltas
ff387d5 to
825ef36
Compare
Resolves: #33735
Resolves: #34027
Resolves: #31986
In this PR:
Allow melismas across rests
Add a parameter to prevent
UndoableTransaction::unwindfrom immediately freeing the text element. This was causing crashes that affected, at least, the creation of empty lyrics and introduction of melismas, rendering them nearly unusable. The crashes were due to:TextBase::endEditwas deferring deletion throughdeleteLater()AddElement::cleanuphad freed them (duringunwind).Therefore, the most straightforward solution to avoid changing the current logic seemed to be to make the cleanup optional. There is probably a cleaner and more future-proof solution to this, but at least it solves the crashes for the time being.
Fix buggy vertical positioning of lyrics syllables on partial re-layout
Drop empty lyrics on file read: our lyrics system assumes there will be no empty lyrics in the mscx file, therefore any pre-existing empty lyrics are deleted through the newly added lyrics path (in
TextBase::endEdit), causing later crashes.<br/>). So the fix just acts as a sanity check.