Fix #23492: Improve error message when attempting to copy partial tuplet/tremolo #30340
+55
−32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves: #23492
As suggested in the original issue thread, the main problem here is that we don't message the user when partially copying a tuplet or tremolo between notes (see
Selection::canCopy
and related methods) - we just silently fail. The changes in this PR ensure that warning messages are displayed for these cases (see below, a copy pass maybe needed).The other part of this can be traced all the way back to #5486. There is actually a warning dialog when trying to paste into a tuplet, but the changes in that PR mean that we skip it whenever we try to paste to the first
ChordRest
in a tuplet. The reasoning there is that we might want to paste from the start of the tuplet (and overwrite the tuplet in the process).