1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 19:55:53 +01:00

Fixed broken IMG maps after print/PDF export

This commit is contained in:
Martin Tůma 2019-05-21 17:44:47 +02:00
parent 5b2af9fc9c
commit 4de22d6679
2 changed files with 7 additions and 1 deletions

View File

@ -141,6 +141,12 @@ int IMGMap::zoomOut()
return _zoom; return _zoom;
} }
void IMGMap::setZoom(int zoom)
{
_zoom = zoom;
updateTransform();
}
void IMGMap::updateTransform() void IMGMap::updateTransform()
{ {
double scale = (2.0 * M_PI * WGS84_RADIUS) / (1<<_zoom);; double scale = (2.0 * M_PI * WGS84_RADIUS) / (1<<_zoom);;

View File

@ -21,7 +21,7 @@ public:
QRectF bounds(); QRectF bounds();
virtual int zoom() const {return _zoom;} 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 zoomFit(const QSize &, const RectC &);
virtual int zoomIn(); virtual int zoomIn();
virtual int zoomOut(); virtual int zoomOut();