mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 19:41:20 +02:00
Forgot if statement
This commit is contained in:
parent
b8bb8026ca
commit
a1475bc65f
1 changed files with 6 additions and 7 deletions
|
@ -444,15 +444,14 @@ void Web3DOverlay::handlePointerEventAsTouch(const PointerEvent& event) {
|
||||||
// FIXME: Scroll bar dragging is a bit unstable in the tablet (content can jump up and down at times).
|
// FIXME: Scroll bar dragging is a bit unstable in the tablet (content can jump up and down at times).
|
||||||
// This may be improved in Qt 5.8. Release notes: "Cleaned up touch and mouse event delivery".
|
// This may be improved in Qt 5.8. Release notes: "Cleaned up touch and mouse event delivery".
|
||||||
//
|
//
|
||||||
// In Qt 5.9 mouse events must be sent before touch events to make sure some QtQuick components will receive mouse events
|
// In Qt 5.9 mouse events must be sent before touch events to make sure some QtQuick components will
|
||||||
QMouseEvent* mouseEvent = new QMouseEvent(mouseType, windowPoint, windowPoint, windowPoint, button, buttons, Qt::NoModifier);
|
// receive mouse events
|
||||||
QCoreApplication::postEvent(_webSurface->getWindow(), mouseEvent);
|
if (!(this->_pressed && event.getType() == PointerEvent::Move)) {
|
||||||
|
QMouseEvent* mouseEvent = new QMouseEvent(mouseType, windowPoint, windowPoint, windowPoint, button, buttons, Qt::NoModifier);
|
||||||
|
QCoreApplication::postEvent(_webSurface->getWindow(), mouseEvent);
|
||||||
|
}
|
||||||
|
|
||||||
QCoreApplication::postEvent(_webSurface->getWindow(), touchEvent);
|
QCoreApplication::postEvent(_webSurface->getWindow(), touchEvent);
|
||||||
|
|
||||||
if (this->_pressed && event.getType() == PointerEvent::Move) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Web3DOverlay::handlePointerEventAsMouse(const PointerEvent& event) {
|
void Web3DOverlay::handlePointerEventAsMouse(const PointerEvent& event) {
|
||||||
|
|
Loading…
Reference in a new issue