Skip to content

Commit

Permalink
Fix #320517: Voice 2 note stems face wrong way when noteheads made in…
Browse files Browse the repository at this point in the history
…visible

Duplicate of musescore#8011, resp. backport of musescore#8012
  • Loading branch information
Jojo-Schmitz committed Jul 28, 2021
1 parent 517444d commit 591d78c
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions libmscore/measure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2794,12 +2794,18 @@ bool Measure::hasVoices(int staffIdx, Fraction stick, Fraction len) const
continue;
bool v = false;
if (cr->isChord()) {
// consider chord visible if any note is visible
Chord* c = toChord(cr);
for (Note* n : c->notes()) {
if (n->visible()) {
v = true;
break;
// consider a chord visible if stem or hook(s) are visible
if ((c->stem() || c->hook()) && c->visible()) {
v = true;
}
else {
// or any of its notes
for (Note* n : c->notes()) {
if (n->visible()) {
v = true;
break;
}
}
}
}
Expand Down

0 comments on commit 591d78c

Please sign in to comment.