From 5dbaeeba69adfc7d70d6c64441516e18509a8398 Mon Sep 17 00:00:00 2001 From: asattely Date: Sat, 11 Sep 2021 19:47:45 +0200 Subject: [PATCH] Fix GH#8971, fix #254426: Tie directions on multivoice chords Backport of #9104, fixes #8971 --- libmscore/tie.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libmscore/tie.cpp b/libmscore/tie.cpp index 45ed64a619c5c..3e660417f513e 100644 --- a/libmscore/tie.cpp +++ b/libmscore/tie.cpp @@ -637,10 +637,11 @@ void Tie::calculateDirection() if (_slurDirection == Direction::AUTO) { std::vector notes = c1->notes(); size_t n = notes.size(); - if (m1->hasVoices(c1->staffIdx(), c1->tick(), c1->actualTicks()) || m2->hasVoices(c2->staffIdx(), c2->tick(), c2->actualTicks())) { - // in polyphonic passage, ties go on the stem side + // if there are multiple voices, the tie direction goes on stem side + if (m1->hasVoices(c1->staffIdx(), c1->tick(), c1->actualTicks())) _up = c1->up(); - } + else if (m2->hasVoices(c2->staffIdx(), c2->tick(), c2->actualTicks())) + _up = c2->up(); else if (n == 1) { // // single note