File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -2062,7 +2062,7 @@ void Score::cmdAddTie(bool addToChord)
20622062 }
20632063 }
20642064
2065- if (noteEntryMode ()) {
2065+ if (noteEntryMode () || selection (). isList () ) {
20662066 ChordRest* cr = nullptr ;
20672067 Chord* c = note->chord ();
20682068 int staffMove = c->staffMove ();
@@ -2168,7 +2168,9 @@ Tie* Score::cmdToggleTie()
21682168 bool canAddTies = false ;
21692169 const size_t notes = noteList.size ();
21702170 std::vector<Note*> tieNoteList (notes);
2171- const bool shouldTieListSelection = notes >= 2 ;
2171+
2172+ bool sameChord = std::all_of (noteList.begin (), noteList.end (), [&](const Note* n) { return n->chord () == noteList[0 ]->chord (); });
2173+ const bool shouldTieListSelection = !sameChord;
21722174
21732175 for (size_t i = 0 ; i < notes; ++i) {
21742176 Note* n = noteList[i];
@@ -2180,6 +2182,16 @@ Tie* Score::cmdToggleTie()
21802182 if (tieNote) {
21812183 canAddTies = true ;
21822184 }
2185+ if (!tieNote && selection ().isList () && sameChord) {
2186+ cmdAddTie ();
2187+ if (notes >= 2 ) {
2188+ Chord* c = n->chord ()->next ();
2189+ for (Note* cn : c->notes ()) {
2190+ score ()->select (cn, SelectType::ADD);
2191+ }
2192+ }
2193+ return nullptr ;
2194+ }
21832195 }
21842196 }
21852197
You can’t perform that action at this time.
0 commit comments