summaryrefslogtreecommitdiff
path: root/src/imports/location/qdeclarativegeomap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/location/qdeclarativegeomap.cpp')
-rw-r--r--src/imports/location/qdeclarativegeomap.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/imports/location/qdeclarativegeomap.cpp b/src/imports/location/qdeclarativegeomap.cpp
index e311d77f..0f54929b 100644
--- a/src/imports/location/qdeclarativegeomap.cpp
+++ b/src/imports/location/qdeclarativegeomap.cpp
@@ -967,8 +967,7 @@ void QDeclarativeGeoMap::fitViewportToGeoShape()
bboxHeight / (height() - margins));
// fixme: use log2 with c++11
zoomRatio = std::log(zoomRatio) / std::log(2.0);
- double newZoom = qMax(minimumZoomLevel(), zoomLevel()
- - zoomRatio);
+ double newZoom = qMax<double>(minimumZoomLevel(), zoomLevel() - zoomRatio);
setZoomLevel(newZoom);
m_validRegion = true;
}