Repository navigation
Fix #35279, #35280: Move tuplets correctly when Insert adds time or time is removed - #35282
davidstephengrant wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to
|
|
|
||
| // shared and origin tuplets are both in the set: don't propagate | ||
| for (Tuplet* t : tuplets) { | ||
| undo(new ChangeProperty(t, Pid::TICK, t->tick() - len)); |
There was a problem hiding this comment.
I would prefer it if we filtered the set so it only contained main and origin items and continued to use undoChangeProperty. Same in noteinput
There was a problem hiding this comment.
Done in both places: shared tuplets are now filtered out and the rest use undoChangeProperty again.
With stave sharing on, Insert collected the tuplets of both the origin staves and the shared staff, and undoChangeProperty(Pid::TICK) also propagated each change to the shared or origin copy, so tuplets moved by twice the inserted length. Deleting one of them later corrupted the measure. Leave shared tuplets out of the set: they follow their origin. Assisted-by: Claude Code 2.1.290 (Claude Opus 5.5)
Score::doTimeDeleteForMeasure() moved the measure's later segments back but not the ticks that tuplets store, so a tuplet after the removed time kept its old tick. Deleting that tuplet then put its rest at the old position, corrupting the measure. Since Insert moves tuplets forward, removing inserted time always left this state. Move those tuplets back with their segments, leaving shared tuplets to follow their origin, as Insert does. Assisted-by: Claude Code 2.1.290 (Claude Opus 5.5)
4457125 to
34a3017
Compare
Resolves: #35279
Resolves: #35280
Follow-up to #35261, which made Insert move the tuplets after the insertion point.
undoChangeProperty, which also moved its shared or origin copy, and both copies were in the list, so tuplets moved by twice the inserted length.Both now change the tuplets' ticks directly, without propagation. Unit tests cover Insert and remove time with stave sharing, remove time before a tuplet, and removing inserted time before a nested tuplet.
Screen.Recording.2026-10-18.at.11.19.41.mov
Assisted by Claude Code 2.1.290 (Claude Opus 5.5)