mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34: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);
|
centerOn(center);
|
||||||
adj.moveCenter(mapFromScene(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(
|
_mapScale->setPos(mapToScene(QPoint(adj.bottomRight() + QPoint(
|
||||||
-(SCALE_OFFSET + _mapScale->boundingRect().width()) * (s.x() / q),
|
-(SCALE_OFFSET + _mapScale->boundingRect().width()) * (s.x() / q),
|
||||||
-(SCALE_OFFSET + _mapScale->boundingRect().height()) * (s.x() / q)))));
|
-(SCALE_OFFSET + _mapScale->boundingRect().height()) * (s.x() / q)))));
|
||||||
} else {
|
} else {
|
||||||
_mapScale->setDigitalZoom(-log2(1.0 / q));
|
_mapScale->setDigitalZoom(_digitalZoom - log2(1.0 / q));
|
||||||
_mapScale->setPos(mapToScene(QPoint(adj.bottomRight() + QPoint(
|
_mapScale->setPos(mapToScene(QPoint(adj.bottomRight() + QPoint(
|
||||||
-(SCALE_OFFSET + _mapScale->boundingRect().width()) / q ,
|
-(SCALE_OFFSET + _mapScale->boundingRect().width()) / q ,
|
||||||
-(SCALE_OFFSET + _mapScale->boundingRect().height()) / q))));
|
-(SCALE_OFFSET + _mapScale->boundingRect().height()) / q))));
|
||||||
|
Loading…
Reference in New Issue
Block a user