Remove static old touch point

This commit is contained in:
vladest 2017-10-12 15:33:13 +02:00
parent 337a74b281
commit d6ebd3d828
2 changed files with 6 additions and 5 deletions

View file

@ -402,8 +402,6 @@ void Web3DOverlay::handlePointerEventAsTouch(const PointerEvent& event) {
touchType = QEvent::TouchEnd;
}
static QTouchEvent::TouchPoint oldTouchPoint;
{
QTouchEvent::TouchPoint point;
point.setId(event.getID());
@ -425,9 +423,11 @@ void Web3DOverlay::handlePointerEventAsTouch(const PointerEvent& event) {
oldTouchPoint = point;
} else {
//const QTouchEvent::TouchPoint& oldTouchPoint = _activeTouchPoints[event.getID()];
point.setStartScenePos(oldTouchPoint.startScenePos());
point.setLastPos(oldTouchPoint.pos());
point.setLastScenePos(oldTouchPoint.scenePos());
if (oldTouchPoint.id() != -1) {
point.setStartScenePos(oldTouchPoint.startScenePos());
point.setLastPos(oldTouchPoint.pos());
point.setLastScenePos(oldTouchPoint.scenePos());
}
}
_activeTouchPoints[event.getID()] = point;
}

View file

@ -103,6 +103,7 @@ private:
uint8_t _currentMaxFPS { 0 };
bool _mayNeedResize { false };
QTouchEvent::TouchPoint oldTouchPoint;
};
#endif // hifi_Web3DOverlay_h