diff options
author | Tomi Korpipää <tomi.korpipaa@digia.com> | 2014-02-28 10:03:52 +0200 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@digia.com> | 2014-02-28 10:13:36 +0200 |
commit | 34a7223467a45e33c1b344f1e1880bc818b66b27 (patch) | |
tree | b37ee19aef13a59307b8dfc7876550da50fba57b | |
parent | f27ec02cee6e0390ec92e82e442cbe3cb12726a5 (diff) |
Fixed touch selection bug
Task-number: QTRD-2904
Change-Id: Ia6a0de9fd8a6b3cd42bd6512227033218162b2c0
Reviewed-by: Mika Salmela <mika.salmela@digia.com>
-rw-r--r-- | src/datavisualization/input/qtouch3dinputhandler.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/datavisualization/input/qtouch3dinputhandler.cpp b/src/datavisualization/input/qtouch3dinputhandler.cpp index da84b33f..fc398e81 100644 --- a/src/datavisualization/input/qtouch3dinputhandler.cpp +++ b/src/datavisualization/input/qtouch3dinputhandler.cpp @@ -25,7 +25,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION const float maxTapAndHoldJitter = 20.0f; const int maxPinchJitter = 10; -#if defined (Q_OS_ANDROID) +#if defined (Q_OS_ANDROID) or defined(Q_OS_IOS) const int maxSelectionJitter = 10; #else const int maxSelectionJitter = 5; @@ -102,6 +102,8 @@ void QTouch3DInputHandler::touchEvent(QTouchEvent *event) } else if (points.count() == 1) { QPointF pointerPos = points.at(0).pos(); if (event->type() == QEvent::TouchBegin) { + // Flush input state + d_ptr->m_inputState = QAbstract3DInputHandlerPrivate::InputStateNone; if (scene()->isSlicingActive()) { if (scene()->isPointInPrimarySubView(pointerPos.toPoint())) setInputView(InputViewOnPrimary); @@ -123,7 +125,8 @@ void QTouch3DInputHandler::touchEvent(QTouchEvent *event) setInputView(InputViewNone); d_ptr->m_holdTimer->stop(); // Handle possible selection - if (QAbstract3DInputHandlerPrivate::InputStatePinching != d_ptr->m_inputState) + if (!scene()->isSlicingActive() + && QAbstract3DInputHandlerPrivate::InputStatePinching != d_ptr->m_inputState) d_ptr->handleSelection(pointerPos); } else if (event->type() == QEvent::TouchUpdate) { if (!scene()->isSlicingActive()) { |