New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tremolo Fixes for #18173 #18259
Tremolo Fixes for #18173 #18259
Conversation
src/engraving/libmscore/tremolo.cpp
Outdated
double offset = gapSp * spatium(); | ||
if (_style == TremoloStyle::TRADITIONAL_ALTERNATE) { | ||
mainStroke->line = LineF(startAnchor, endAnchor); | ||
startAnchor.rx() += offset; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't use these rx() and ry(). Use setX and setY
@@ -894,10 +894,12 @@ int BeamTremoloLayout::isSlopeConstrained(int startNote, int endNote) const | |||
// 0 to constrain to flat, 1 to constrain to 0.25, <0 for no constraint | |||
if (startNote == endNote) { | |||
return 0; | |||
} else if (m_beamType == BeamType::TREMOLO) { | |||
return -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isSlopeConstrained is not a good name for this type of method. It should either return bool or have another name
@@ -894,10 +894,12 @@ int BeamTremoloLayout::isSlopeConstrained(int startNote, int endNote) const | |||
// 0 to constrain to flat, 1 to constrain to 0.25, <0 for no constraint | |||
if (startNote == endNote) { | |||
return 0; | |||
} else if (m_beamType == BeamType::TREMOLO) { | |||
return -1; | |||
} | |||
// if a note is more extreme than the endpoints, slope is 0 | |||
// p.s. _notes is a sorted vector |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong comment
All @RomanPudashkin's suggestions implemented, all of the engraving-related points of the original issue (not the UI one for tremolo stem direction) are now addressed! |
@asattely thanks! Looks much better! |
PR #18259 for 4.1.0 (Tremolo fix megaissue)
Resolves: #18173