From 32cbd33c9129175dbeb9b8823bf58629e801e03b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Mon, 16 Jan 2017 21:45:50 +0100 Subject: [PATCH] Fixed tile area computation --- src/pathview.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pathview.cpp b/src/pathview.cpp index 86bbb456..8a1a96bd 100644 --- a/src/pathview.cpp +++ b/src/pathview.cpp @@ -657,8 +657,9 @@ void PathView::drawBackground(QPainter *painter, const QRectF &rect) QList 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);