Get entities list and entity properties scrollbars working on tablet

This commit is contained in:
David Rowe 2017-03-30 14:04:03 +13:00
parent 985924a476
commit f954767b84

View file

@ -350,11 +350,11 @@ void Web3DOverlay::handlePointerEventAsTouch(const PointerEvent& event) {
glm::vec2 windowPos = event.getPos2D() * (METERS_TO_INCHES * _dpi);
QPointF windowPoint(windowPos.x, windowPos.y);
if (event.getButtons() == PointerEvent::NoButtons && event.getType() == PointerEvent::Move) {
// Forward a mouse move event to the Web surface.
if (event.getType() == PointerEvent::Move) {
// Forward a mouse move event to the Web surface so that hover events are generated.
// Must send a mouse move event that matches up with touch move event in order for scroll bars to work.
QMouseEvent* mouseEvent = new QMouseEvent(QEvent::MouseMove, windowPoint, windowPoint, windowPoint, Qt::NoButton, Qt::NoButton, Qt::NoModifier);
QCoreApplication::postEvent(_webSurface->getWindow(), mouseEvent);
return;
}
if (event.getType() == PointerEvent::Press && event.getButton() == PointerEvent::PrimaryButton) {