mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-27 21:24:47 +01:00
Fixed scale info when printing/exporting with digital zoom
This commit is contained in:
parent
beb966c58f
commit
1aedc1de93
@ -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))));
|
||||
|
Loading…
Reference in New Issue
Block a user