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

Use the correct DPI value for zooming

This commit is contained in:
Martin Tůma 2017-08-29 15:31:12 +02:00
parent 5efb9f8a4e
commit 33b1e179d3

View File

@ -3,7 +3,6 @@
#include <QWheelEvent>
#include <QApplication>
#include <QPixmapCache>
#include "config.h"
#include "opengl.h"
#include "misc.h"
#include "poi.h"
@ -499,7 +498,8 @@ void PathView::plot(QPainter *painter, const QRectF &target, bool hires)
origLL = _map->xy2ll(origScene);
origRes = _map->resolution(origScene);
qreal r = painter->device()->logicalDpiX() / SCREEN_DPI;
qreal r = painter->device()->logicalDpiX()
/ (qreal)metric(QPaintDevice::PdmDpiX);
adj.setSize(QSize(adj.width() * r, adj.height() * r));
_map->zoomFit(adj.size(), _tr | _rr | _wr);
rescale();