fix #297446: shift+click empty space clears selection #6138
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: https://musescore.org/en/node/297446
Currently if you have a selection and try to shift+click to extend it
but accidentally click too far above or below where you intended,
the existing selection is lost.
There is no benefit to this behavior, since the way to clear a selection
is to click, not shift+click, an empty space.
Shift+click an empty space should be harmless, as ctrl+click is.
I previously implemented the check for ctrl+click,
I simply negeclted to include shift+click.
This is fixed by changing the two tests that were detecting ctrl+click
and skipping the usual clear selection in the case,
so they instead skip the clear for both ctrl & shift click
(actually, for anything but plain click).