diff options
author | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2016-06-20 10:15:20 +0300 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2016-06-20 07:30:12 +0000 |
commit | 2fd6f64f35f30b5776a3b67217634598a905409a (patch) | |
tree | 811ba4585a780e4109df8861098c54d40e25608d /editorlib/src/editorscene.cpp | |
parent | ae766a528860bb759757db41cc31dc85a84f6e19 (diff) |
Don't display context menu after dragging camera around
Change-Id: I3d71fb094b5ab315add4f8d125cc69ebe6fc5b46
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'editorlib/src/editorscene.cpp')
-rw-r--r-- | editorlib/src/editorscene.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/editorlib/src/editorscene.cpp b/editorlib/src/editorscene.cpp index 8615abf..c01e590 100644 --- a/editorlib/src/editorscene.cpp +++ b/editorlib/src/editorscene.cpp @@ -630,7 +630,6 @@ void EditorScene::dragHandleMove(const QPoint &pos, bool shiftDown, bool ctrlDow default: break; } - m_previousMousePosition = pos; } } @@ -2385,9 +2384,9 @@ bool EditorScene::handleMousePress(QMouseEvent *event) bool EditorScene::handleMouseRelease(QMouseEvent *event) { if (event->button() == Qt::RightButton) { - if (m_dragMode == DragNone || m_ignoringInitialDrag) { + QPoint delta = event->pos() - m_previousMousePosition; + if (delta.manhattanLength() < 5 && (m_dragMode == DragNone || m_ignoringInitialDrag)) emit mouseRightButtonReleasedWithoutDragging(); - } } m_cameraViewCenterSelected = false; cancelDrag(); |