-
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
Disable most toolbar editing options for trill cue notes #19304
Conversation
3d077cb
to
f122fa4
Compare
@@ -1994,7 +1995,7 @@ void NotationInteraction::doAddSlur(const mu::engraving::Slur* slurTemplate) | |||
secondChordRest = mu::engraving::nextChordRest(firstChordRest); | |||
} | |||
|
|||
if (firstChordRest) { | |||
if (firstChordRest && !(firstChordRest->isTrillCueNote() || secondChordRest->isTrillCueNote())) { |
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'm not sure but it might be wise to add a null check for secondChordRest
here...
if (firstChordRest && !(firstChordRest->isTrillCueNote() || secondChordRest->isTrillCueNote())) { | |
if (firstChordRest && !(firstChordRest->isTrillCueNote() || (secondChordRest && secondChordRest->isTrillCueNote()))) { |
(Inside doAddSlur
, it seems not bad if secondChordRest
is null, but for performing this check itself, it does matter of course.)
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.
Just tried it out: indeed a null check is necessary. (add a trill to the very last note of a score, and try to add a slur between the main note and the trill cue note)
@@ -1965,12 +1965,13 @@ void NotationInteraction::doAddSlur(const mu::engraving::Slur* slurTemplate) | |||
} | |||
} | |||
|
|||
if (firstChordRest && (firstChordRest != secondChordRest)) { | |||
if (firstChordRest && (firstChordRest != secondChordRest) | |||
&& !(firstChordRest->isTrillCueNote() || secondChordRest->isTrillCueNote())) { |
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.
Maybe here too actually
&& !(firstChordRest->isTrillCueNote() || secondChordRest->isTrillCueNote())) { | |
&& !(firstChordRest->isTrillCueNote() || (secondChordRest && secondChordRest)->isTrillCueNote())) { |
f122fa4
to
a7d8393
Compare
src/engraving/dom/chordrest.cpp
Outdated
if (isChord()) { | ||
m_isTrillCueNote = v; | ||
} else { | ||
m_isTrillCueNote = false; |
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.
This looks too weird. It should be in the Chord class. Also, for setters, you would expect them to always change the current value, not under some conditions...
40387af
to
ec8663d
Compare
ec8663d
to
fa0d0f5
Compare
Resolves: #18330
Disable editing trill cue note:
and make behaviour when trying to make the cue note a triplet consistent with grace notes (ie. does nothing)