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.
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
[1.14] Fix keyboard selection and copyOnSelect interaction #13360
[1.14] Fix keyboard selection and copyOnSelect interaction #13360
Changes from all commits
b0b0a6c
c4f37fc
d9cfe31
9dc99a9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
If we're
CopyOnSelect() == true
wouldn't we have already copied the selection at this point inControlInteractivity::PointerReleased
?When is
IsInQuickEditMode() == false
? Whenever we do a keyboard selection? WouldIsInMouseSelectionMode
(or inverselyIsInKeyboardSelectionMode
) not be a better (more descriptive and modern) function name then?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.
Yes and no.
Yes, because that covers the scenario of (1) create a mouse selection then (2) releasing the mouse button. The content immediately gets copied to your clipboard. When you right-click, you paste that content, so this code isn't called at all because we're not in "quick edit mode".
No, because "quick edit mode" is specifically when you add these steps to the scenario above... (3) shift+right to extend the selection a bit. Then, when you right-click, we already copied the wrong contents! We copied the data when you let go, not when you're right-clicking. So this extra code just detects when you've done step 3 and we need to copy the contents again.
QuickEditMode == true
--> you made a selection with the mouse, then modified it with the keyboardMarkMode == true
--> you toggled mark mode manually (created a selection at the cursor)They're mutually exclusive. After a quick chat with Dustin, here's a new approach...
We just have 3 modes in increasing order. All mutually exclusive, but all useful to know when to show the selection markers and what trickery could occur. That also lets me combine
IsInMarkMode
andIsInQuickEditMode
. AND it also gets rid of the historical term of "quick edit mode".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 approach only applies to 1.15+