Skip to content

Commit

Permalink
fix #63561: TAB - Modified stem direction - don't work properly
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed Jun 3, 2015
1 parent ae9d4cf commit 33797cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion libmscore/chord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -805,8 +805,9 @@ void Chord::computeUp()
// if no stems or stem beside staves
if (tab->slashStyle() || !tab->stemThrough()) {
// if measure has voices, set stem direction according to voice
// reverse the logic if stemsDown (#63561)
if (measure()->mstaff(staffIdx())->hasVoices)
_up = !(track() % 2);
_up = !tab->stemsDown() ? !(track() % 2) : (track() % 2);
else // if only voice 1,
_up = !tab->stemsDown();// unconditionally set _up according to TAB stem direction
return; // (if no stems, _up does not really matter!)
Expand Down
2 changes: 1 addition & 1 deletion libmscore/measure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3531,7 +3531,7 @@ void Measure::layoutX(qreal stretch)
if (stt->slashStyle()) // if no stems
distAbove = stt->genDurations() ? -stt->durationBoxY() : 0.0;
else { // if stems
if (stt->stemsDown())
if (stt->stemsDown() && !mstaff(staffIdx)->hasVoices)
distBelow = (STAFFTYPE_TAB_DEFAULTSTEMLEN_UP + STAFFTYPE_TAB_DEFAULTSTEMDIST_UP)*_spatium;
else
distAbove = (STAFFTYPE_TAB_DEFAULTSTEMLEN_DN + STAFFTYPE_TAB_DEFAULTSTEMDIST_DN)*_spatium;
Expand Down

0 comments on commit 33797cd

Please sign in to comment.