#3794 Improve wheel zooming

This commit is contained in:
Gaute Lindkvist
2018-12-11 10:30:46 +01:00
parent 240c748910
commit 914daded6b
7 changed files with 109 additions and 15 deletions

View File

@@ -89,6 +89,7 @@ bool RiuGeoQuestNavigation::handleInputEvent(QInputEvent* inputEvent)
isEventHandled = true;
}
}
forcePointOfInterestUpdateDuringNextWheelZoom();
}
break;
case QEvent::MouseButtonRelease:
@@ -144,11 +145,12 @@ bool RiuGeoQuestNavigation::handleInputEvent(QInputEvent* inputEvent)
{
if (inputEvent->modifiers() == Qt::NoModifier)
{
initializeRotationCenter();
QWheelEvent* we = static_cast<QWheelEvent*>(inputEvent);
updatePointOfInterestDuringZoomIfNecessary(we->x(), we->y());
if (m_isRotCenterInitialized)
{
QWheelEvent* we = static_cast<QWheelEvent*>(inputEvent);
int translatedMousePosX, translatedMousePosY;
cvfEventPos(we->x(), we->y(), &translatedMousePosX, &translatedMousePosY);