From 1aedc1de93acecf0b794afdfb9346302bcccd61b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 28 Apr 2018 22:34:37 +0200 Subject: [PATCH] Fixed scale info when printing/exporting with digital zoom --- src/GUI/mapview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GUI/mapview.cpp b/src/GUI/mapview.cpp index 72ccaab1..15e6529d 100644 --- a/src/GUI/mapview.cpp +++ b/src/GUI/mapview.cpp @@ -537,12 +537,12 @@ void MapView::plot(QPainter *painter, const QRectF &target, qreal scale, centerOn(center); adj.moveCenter(mapFromScene(center)); - _mapScale->setDigitalZoom(-log2(s.x() / q)); + _mapScale->setDigitalZoom(_digitalZoom - log2(s.x() / q)); _mapScale->setPos(mapToScene(QPoint(adj.bottomRight() + QPoint( -(SCALE_OFFSET + _mapScale->boundingRect().width()) * (s.x() / q), -(SCALE_OFFSET + _mapScale->boundingRect().height()) * (s.x() / q))))); } else { - _mapScale->setDigitalZoom(-log2(1.0 / q)); + _mapScale->setDigitalZoom(_digitalZoom - log2(1.0 / q)); _mapScale->setPos(mapToScene(QPoint(adj.bottomRight() + QPoint( -(SCALE_OFFSET + _mapScale->boundingRect().width()) / q , -(SCALE_OFFSET + _mapScale->boundingRect().height()) / q))));