From 4de22d6679f02de90fa3f33179cfc1f608b1f791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Tue, 21 May 2019 17:44:47 +0200 Subject: [PATCH] Fixed broken IMG maps after print/PDF export --- src/map/imgmap.cpp | 6 ++++++ src/map/imgmap.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/map/imgmap.cpp b/src/map/imgmap.cpp index 2db62d47..fc8dc4aa 100644 --- a/src/map/imgmap.cpp +++ b/src/map/imgmap.cpp @@ -141,6 +141,12 @@ int IMGMap::zoomOut() return _zoom; } +void IMGMap::setZoom(int zoom) +{ + _zoom = zoom; + updateTransform(); +} + void IMGMap::updateTransform() { double scale = (2.0 * M_PI * WGS84_RADIUS) / (1<<_zoom);; diff --git a/src/map/imgmap.h b/src/map/imgmap.h index b3c96f17..0c46419e 100644 --- a/src/map/imgmap.h +++ b/src/map/imgmap.h @@ -21,7 +21,7 @@ public: QRectF bounds(); virtual int zoom() const {return _zoom;} - virtual void setZoom(int zoom) {_zoom = zoom;} + virtual void setZoom(int zoom); virtual int zoomFit(const QSize &, const RectC &); virtual int zoomIn(); virtual int zoomOut();