1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 11:45:53 +01: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++) { for (int i = 0; i < tiles.count(); i++) {
Tile &t = tiles[i]; Tile &t = tiles[i];
QPointF tp(qMax(tl.x(), b.left()) + (t.xy().x() - tile.x()) * tileSize(), QPointF tp = _zoom ? QPointF(tl.x() + (t.xy().x() - tile.x())
qMax(tl.y(), b.top()) + ((_invertY ? (1<<_zoom) - t.xy().y() - 1 : * tileSize(), tl.y() + ((_invertY ? (1<<_zoom) - t.xy().y() - 1 :
t.xy().y()) - tile.y()) * tileSize()); t.xy().y()) - tile.y()) * tileSize()) : QPointF(-128, -128);
if (!t.pixmap().isNull()) { if (!t.pixmap().isNull()) {
#ifdef ENABLE_HIDPI #ifdef ENABLE_HIDPI
t.pixmap().setDevicePixelRatio(imageRatio()); t.pixmap().setDevicePixelRatio(imageRatio());