1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-01-31 09:05:14 +01:00

Fixed tile area computation

This commit is contained in:
Martin Tůma 2017-01-16 21:45:50 +01:00
parent 0e356d0222
commit 32cbd33c91

View File

@ -657,8 +657,9 @@ void PathView::drawBackground(QPainter *painter, const QRectF &rect)
QList<Tile> tiles;
for (int i = 0; i <= ceil(rr.size().width() / Tile::size()); i++)
for (int j = 0; j <= ceil(rr.size().height() / Tile::size()); j++)
QSizeF s(rect.right() - tl.x(), rect.bottom() - tl.y());
for (int i = 0; i < ceil(s.width() / Tile::size()); i++)
for (int j = 0; j < ceil(s.height() / Tile::size()); j++)
tiles.append(Tile(QPoint(tile.x() + i, tile.y() + j), _zoom));
_map->loadTiles(tiles, _plot);