-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Support bends and dives on the same notes #31698
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
base: master
Are you sure you want to change the base?
Support bends and dives on the same notes #31698
Conversation
2b84ef0 to
77853ca
Compare
miiizen
left a comment
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.
Looking really good!
src/engraving/dom/guitarbend.cpp
Outdated
| } | ||
| if (isValid) { | ||
| if (bendType() == GuitarBendType::PRE_BEND) { | ||
| Note* startN = prevBend->startNote(); |
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.
Name warning
| if (bendType() == GuitarBendType::PRE_DIVE || bendType() == GuitarBendType::PRE_BEND) { | ||
| GuitarBend* prevBend = findPrecedingBend(); | ||
| if (prevBend && prevBend->holdLine()) { | ||
| mutldata()->setBendDigit(u""); |
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.
I overlooked this previously, but it feels like computeBendText should be part of the layout code. It would be good to avoid manipulating layout data in the DOM as much as possible.
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.
That's a good point, but it's a bit of a mixed situation, because this function is called by GuitarBend::computeBendAmount which then should be also moved to the layout code, but then one could argue that the bend amount is really not layout information but intrinsic DOM information. I definitely need to clean this up but it will have to wait for the next PR
8369f48 to
5be4cf6
Compare
Continuation of #31292