Merge pull request #1240 from manongjohn/fix_pen_drag_on_tap

Fix potential pen-drag actions when tapping
This commit is contained in:
manongjohn 2023-10-19 08:14:33 -04:00 committed by GitHub
commit 919d538155
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -401,6 +401,12 @@ void SceneViewer::tabletEvent(QTabletEvent *e) {
m_tabletState = Released;
mouseEvent.m_button = Qt::LeftButton;
onRelease(mouseEvent);
} else if (m_tabletState == StartStroke) {
// Single tap of stylus still records TableMoves before TabletRelease.
// Skip the 1st TabletMove to give time for TabletRelease to show up
// This way we don't try to do a LeftButtonDrag operation (i.e. normal
// fill) too soon.
m_tabletState = OnStroke;
} else {
m_tabletMove = true;
onMove(mouseEvent); // m_tabletState is set to OnStrole here