1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-06 14:53:21 +02:00

Properly fixed the zoom 0 display issue

(without breaking non-default map bounds)
This commit is contained in:
Martin Tůma 2018-09-23 21:07:16 +02:00
parent 083dd39bef
commit d8116c7f5d

View File

@ -122,9 +122,10 @@ void OnlineMap::draw(QPainter *painter, const QRectF &rect, Flags flags)
for (int i = 0; i < tiles.count(); i++) {
Tile &t = tiles[i];
QPointF tp(qMax(tl.x(), b.left()) + (t.xy().x() - tile.x()) * tileSize(),
qMax(tl.y(), b.top()) + ((_invertY ? (1<<_zoom) - t.xy().y() - 1 :
t.xy().y()) - tile.y()) * tileSize());
QPointF tp = _zoom ? QPointF(tl.x() + (t.xy().x() - tile.x())
* tileSize(), tl.y() + ((_invertY ? (1<<_zoom) - t.xy().y() - 1 :
t.xy().y()) - tile.y()) * tileSize()) : QPointF(-128, -128);
if (!t.pixmap().isNull()) {
#ifdef ENABLE_HIDPI
t.pixmap().setDevicePixelRatio(imageRatio());