Skip to content

Fix #26105: Copy slurs to existing parts during Implode#34076

Open
pyonpyoco wants to merge 1 commit into
musescore:mainfrom
pyonpyoco:fix/implode-slurs-in-parts
Open

Fix #26105: Copy slurs to existing parts during Implode#34076
pyonpyoco wants to merge 1 commit into
musescore:mainfrom
pyonpyoco:fix/implode-slurs-in-parts

Conversation

@pyonpyoco

Copy link
Copy Markdown
Contributor

Resolves: #26105

When copying spanners during Implode, use the linked-aware undoAddElement() path when link == false, matching the behavior used for ChordRests and annotations.

2026-07-05_142050_light.mp4
  • I signed the CLA as username:
  • The title of the PR describes the problem it addresses.
  • Each commit's message describes its purpose and effects, and references the issue it resolves. If changes are extensive, there is a sequence of easily reviewable commits.
  • The code in the PR follows the coding rules.
  • I understand all aspects of the code I'm contributing and I'm able to explain it if requested.
  • The code compiles and runs on my machine, preferably after each commit individually. I have manually tested and verified that my changes fulfil their intended purpose.
  • No prior attempts to resolve this problem exist, or if they do, I listed them in my PR description and described how I avoided repeating past mistakes.
  • There are no unnecessary changes.
  • I created a unit test or vtest to verify the changes I made (if applicable).

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c4111d7e-60e1-4506-9956-f178c7e03d1e

📥 Commits

Reviewing files that changed from the base of the PR and between 5cb4118 and 37fcf58.

📒 Files selected for processing (1)
  • src/engraving/editing/clonevoice.cpp

📝 Walkthrough

Walkthrough

This change modifies the spanner insertion logic in clonevoice.cpp for cloned voice elements such as slurs and hairpins. The insertion method now depends on the link parameter: doUndoAddElement is used when link is true, while undoAddElement is used when link is false. Previously, doUndoAddElement was called unconditionally regardless of the link state.

Changes

Area Description
src/engraving/editing/clonevoice.cpp Conditionally selects between doUndoAddElement and undoAddElement for inserting cloned spanner elements based on the link flag

Sequence Diagram(s)

Not applicable — the change is a small conditional branch within an existing function and does not introduce a new interaction flow.

Compact metadata

  • Files changed: 1
  • Lines changed: +5/-1
  • Estimated review effort: Medium

Related issues: None specified
Related PRs: None specified
Suggested labels: review_needed_junior_swe, review_depth_standard
Suggested reviewers: None specified

Poem
A rabbit hopped through cloned voice lines,
Where slurs and hairpins cross their signs.
"If linked," it thought, "then do it true,
Else just add it, nothing new."
One small branch, a careful tweak—
Hop hop hop, the fix complete.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main fix for Implode copying slurs into existing parts.
Description check ✅ Passed The description follows the template and explains the fix, but the CLA username placeholder and test checkbox are not fully completed.
Linked Issues check ✅ Passed The change matches issue #26105 by fixing slur copying during Implode so parts keep the slurs visible.
Out of Scope Changes check ✅ Passed The diff is narrowly scoped to the Implode spanner-addition path with no obvious unrelated changes.
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: Your configuration references 1 linked repositories, but your current plan allows 0. 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.

@mathesoncalum mathesoncalum requested a review from mike-spa July 6, 2026 07:15

@mike-spa mike-spa 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.

@davidstephengrant please test

@zacjansheski

Copy link
Copy Markdown
Contributor

Tested on MacOS Tahoe 26.2, Windows 11, Ubuntu 22.04.3. Approved
#26105 FIXED

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.

Implode doesn't keep legato slurs in part

6 participants