Repository navigation
Fix Select tool gesture handling with touch shortcuts and clear stale selection previews - #1346
Conversation
… selection previews
|
I tested this with a left-button double-click shortcut and found two regressions:
I’d have the viewport cancel the pending click shortcut as soon as Flutter recognizes a drag, then replay the buffered pointer events before calling |
|
Thank you for your reply. I've now implemented the suggestions, and now both of those regressions no longer occur. |
| if (bufferedEvents.isNotEmpty) { | ||
| await _replayPointerEvents(bufferedEvents, input); | ||
| } | ||
|
|
There was a problem hiding this comment.
i would save _inputGeneration before await and then test if _isCurrentInput. Otherwise i think the method would still run after the page is closed
There was a problem hiding this comment.
Thank you for spotting this issue. I've now added in the _isCurrentInput check.
CodeDoctorDE
left a comment
There was a problem hiding this comment.
Now its look good!
Thanks for the multiple contributons
Description
Synchronises the selection handler with the pointer shortcut system, so that detecting events from the pointer shortcut system does not cancel the scale tool when in operation.
Problem
Previously, binding an action to double/triple tap for touches in the input menu in settings, while the touch shortcut was bound to a specific toolbar position corresponding to the Select tool, caused selections to not be processed in a majority of cases.
This was likely due to the Select tool's scale events being processed initially, then being overwritten by the pointer shortcut manager, which checks for multiple taps and cancels the Select tool's selection for Lasso and Rectangle modes.
Related Issue
Closes #1345