Skip to content

Commit

Permalink
Fix #79716 - TAB: staff scale and length of unbeamed stems beside staff
Browse files Browse the repository at this point in the history
__References__:
Original issue: https://musescore.org/en/node/79716
Forum thread: https://musescore.org/en/node/79401

Changing the scale of a staff affects the length of unbeamed stems beside staff twice.
  • Loading branch information
mgavioli committed Sep 24, 2015
1 parent 1d8a874 commit 87a90a7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libmscore/stafftype.cpp
Expand Up @@ -608,9 +608,10 @@ qreal StaffType::chordStemLength(const Chord* chord) const
else {
bool shrt = (minimStyle() == TablatureMinimStyle::SHORTER) && (chord->durationType().type() == TDuration::DurationType::V_HALF);
stemLen = (stemsDown() ? STAFFTYPE_TAB_DEFAULTSTEMLEN_DN : STAFFTYPE_TAB_DEFAULTSTEMLEN_UP)
* (shrt ? STAFFTYPE_TAB_SHORTSTEMRATIO : 1.0) * chord->mag();
* (shrt ? STAFFTYPE_TAB_SHORTSTEMRATIO : 1.0);
}
return stemLen;
// scale length by scale of parent chord, but relative to scale of context staff
return stemLen * chord->mag() / chord->staff()->mag();
}

//---------------------------------------------------------
Expand Down

0 comments on commit 87a90a7

Please sign in to comment.