Skip to content

Commit

Permalink
Merge pull request #1240 from manongjohn/fix_pen_drag_on_tap
Browse files Browse the repository at this point in the history
Fix potential pen-drag actions when tapping
  • Loading branch information
manongjohn committed Oct 19, 2023
2 parents e46ad6f + 2c2af1e commit 919d538
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions toonz/sources/toonz/sceneviewerevents.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 919d538

Please sign in to comment.