Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

change clean-up location and add comment

tomosucb0b4d066f88
diff --git a/toonz/sources/toonz/sceneviewerevents.cpp b/toonz/sources/toonz/sceneviewerevents.cpp
index 8063ffdb4..833cea9be 100644
--- a/toonz/sources/toonz/sceneviewerevents.cpp
+++ b/toonz/sources/toonz/sceneviewerevents.cpp
@@ -957,6 +957,15 @@ using namespace ImageUtils;
void SceneViewer::contextMenuEvent(QContextMenuEvent *e)
{
+
+#ifdef MACOSX
+ //cleaning-up mousePressedEvent on MacOSX instead of mouseReleaseEvent called
+ m_mouseButton = Qt::NoButton;
+ m_tabletEvent = false;
+ m_pressure = 0;
+ m_buttonClicked = false;
+#endif
+
if (m_freezedStatus != NO_FREEZED)
return;
@@ -982,13 +991,6 @@ void SceneViewer::contextMenuEvent(QContextMenuEvent *e)
menu->exec(e->globalPos());
delete menu;
-#ifdef MACOSX
- m_mouseButton = Qt::NoButton;
- m_tabletEvent = false;
- m_pressure = 0;
- m_buttonClicked = false;
-#endif
-
}
//-----------------------------------------------------------------------------