From fc3c30c3bdd83f9ea13ce7b6cc7ed48d0ba74f1e Mon Sep 17 00:00:00 2001 From: David Stephen Grant Date: Thu, 29 Oct 2026 21:52:56 +0100 Subject: [PATCH 1/2] Fix #35434: Adding a slur from a list-selected chord does not connect to next note For a list selection, doAddSlur() meant to slur a lone chord to the next one, but compared firstChordRest, which is never set in that branch, so the slur started and ended on the same chord. Compare firstItem with secondItem instead. Assisted-by: Claude Code 2.1.310 (Claude Opus 5.5) --- src/notation/internal/notationinteraction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/notation/internal/notationinteraction.cpp b/src/notation/internal/notationinteraction.cpp index 36d0e15cbba..10a53220b94 100644 --- a/src/notation/internal/notationinteraction.cpp +++ b/src/notation/internal/notationinteraction.cpp @@ -2878,7 +2878,7 @@ void NotationInteraction::doAddSlur(const Slur* slurTemplate) } } - if (firstChordRest == secondItem && (!firstItem || firstItem->isChordRest())) { + if (firstItem == secondItem && (!firstItem || firstItem->isChordRest())) { ChordRestNavigateOptions options; options.disableOverRepeats = true; secondItem = engraving::Navigation::nextChordRest(toChordRest(firstItem), options); From 34b557c55208968a71eff83f90be62d2f21f6e63 Mon Sep 17 00:00:00 2001 From: David Stephen Grant Date: Thu, 29 Oct 2026 23:17:25 +0100 Subject: [PATCH 2/2] Slur a list-selected single chord as a single note A list selection that comes down to one chord was slurred to the next chord directly, so unlike a single selected note it didn't follow tie chains or open the slur's end handle for editing. Add its slur the way a single note's is added instead. Assisted-by: Claude Code 2.1.310 (Claude Opus 5.5) --- src/notation/internal/notationinteraction.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/notation/internal/notationinteraction.cpp b/src/notation/internal/notationinteraction.cpp index 10a53220b94..b16c90c56ff 100644 --- a/src/notation/internal/notationinteraction.cpp +++ b/src/notation/internal/notationinteraction.cpp @@ -2878,16 +2878,16 @@ void NotationInteraction::doAddSlur(const Slur* slurTemplate) } } - if (firstItem == secondItem && (!firstItem || firstItem->isChordRest())) { - ChordRestNavigateOptions options; - options.disableOverRepeats = true; - secondItem = engraving::Navigation::nextChordRest(toChordRest(firstItem), options); - } - bool firstCrTrill = firstItem && firstItem->isChord() && toChord(firstItem)->isTrillCueNote(); bool secondCrTrill = secondItem && secondItem->isChord() && toChord(secondItem)->isTrillCueNote(); - if (firstItem && secondItem && (firstItem->isChordRest() || secondItem->isChordRest()) && !(firstCrTrill || secondCrTrill)) { + if (firstItem && firstItem == secondItem) { + // A single chord is slurred as a single note is + if (firstItem->isChord() && !firstCrTrill) { + doAddSlur(firstItem, nullptr, slurTemplate); + } + } else if (firstItem && secondItem && (firstItem->isChordRest() || secondItem->isChordRest()) + && !(firstCrTrill || secondCrTrill)) { doAddSlur(firstItem, secondItem, slurTemplate); } }