From 24e7f37ed37e2d96e8331fc67125e556b15ab87d Mon Sep 17 00:00:00 2001 From: shun-iwasawa Date: Feb 19 2018 02:40:35 +0000 Subject: fix jumping stroke (#1811) --- diff --git a/toonz/sources/toonz/sceneviewerevents.cpp b/toonz/sources/toonz/sceneviewerevents.cpp index ddf02c3..108011b 100644 --- a/toonz/sources/toonz/sceneviewerevents.cpp +++ b/toonz/sources/toonz/sceneviewerevents.cpp @@ -587,14 +587,20 @@ void SceneViewer::mousePressEvent(QMouseEvent *event) { //----------------------------------------------------------------------------- void SceneViewer::onPress(const TMouseEvent &event) { + if (m_mouseButton != Qt::NoButton) { + // if some button is pressed while another button being active, + // finish the action for the previous button first. + TMouseEvent preEvent = event; + preEvent.m_button = m_mouseButton; + onRelease(preEvent); + } + // evita i press ripetuti if (m_buttonClicked) return; m_buttonClicked = true; m_toolSwitched = false; if (m_freezedStatus != NO_FREEZED) return; - if (m_mouseButton != Qt::NoButton) return; - m_pos = event.mousePos() * getDevPixRatio(); m_mouseButton = event.button();