Skip to content
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

Fix tablet events and cleanup events handling #1168

Merged
merged 11 commits into from Jan 30, 2019

Conversation

Projects
None yet
2 participants
@CandyFace
Copy link
Member

CandyFace commented Jan 30, 2019

We now have a specific PointerEvent class that should take care of all the mouse and tablet events and get rid of a so much duplicate code.

The PR however also fixes:
#1165
#1162

Additional fixes:

  • Eyedropper icon resetting when the release event is done
  • Select tool leaves a small selection piece when trying to tab to deselect.
  • This is WIP solution...

I've tested it with my mouse and tablet and it works here but I've come to learn that, that measurement is not good enough so please test it with a mouse and tablet yourself to make sure it doesn't break anything.

CandyFace added some commits Jan 27, 2019

Rework mouse and tablet events
+ Implement PointerEvents to handle both mouse and tablet and future events...
+ Implement double click handling for tablet input
+ Fix polyline rendering #1162
Re-implement tablet sends double events workaround
Some tablet drivers seems to be horribly broken, meaning that qt reports them as both Mouse and Tablet events... this causes all kinds of problems  that this workaround fixes.
Revert dabs to release event
This was a mistake...
Remove the selection when it's not deliberate
This fixes an issue where if the user tabs to deselect but leaves a small selection
{
// if we land here... the incoming input was
// neither tablet nor mouse
return mWidgetPos.toPoint();

This comment has been minimized.

Copy link
@chchwy

chchwy Jan 30, 2019

Member

Any possibilities the event is not mouse nor tablet?

This comment has been minimized.

Copy link
@CandyFace

CandyFace Jan 30, 2019

Author Member

Hmm no I guess not, well not until we implement another event like touch event.

chchwy and others added some commits Jan 30, 2019

@chchwy

chchwy approved these changes Jan 30, 2019

Copy link
Member

chchwy left a comment

Overall it's good. Thanks for implementing this @CandyFace

@chchwy chchwy merged commit 7cf8c04 into pencil2d:master Jan 30, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.