-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
factor notehead offset into stem length calculations #19558
Conversation
Stems still extend when they are beamed video1431782670.mp4 |
src/engraving/dom/chord.cpp
Outdated
@@ -1420,7 +1420,7 @@ double Chord::calcDefaultStemLength() | |||
// when the chord's magnitude is < 1, the stem length with mag can find itself below the middle line. | |||
// in those cases, we have to add the extra amount to it to bring it to a minimum. | |||
double upValue = m_up ? -1. : 1.; | |||
double stemStart = startNote->pos().y(); | |||
double stemStart = startNote->pos().y() - startNote->offset().y(); |
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.
Same as https://github.com/musescore/MuseScore/pull/19559/files#r1341666459; startNote->layoutData()->pos()
would be a more direct way of getting the desired value
I've prevented the beamed notes stems from extending by subtracting the notehead offset in the value returned by |
The current solution seems good to me. Are there any anticipated problems related to the |
I think it's fine; actually it's not that inconsistent, because if I'm not mistaken, the implementation of |
@zacjansheski Shall we merge it in that case? |
Oh, wait a minute, a rebase is needed as |
@cbjeukendrup no, as long as you're happy with it go ahead! |
d7e8ccd
to
a1ff998
Compare
Resolves: #19488
Stems no longer extend when changing notehead offset.