From 1a66ed0a362afe59f9a1965cd1532ccf4e382d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Mon, 1 May 2017 22:49:01 +0200 Subject: [PATCH] Use the proper layer when displaying a single waypoint on an atlas. --- src/atlas.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/atlas.cpp b/src/atlas.cpp index 6ceeffe2..6c19192a 100644 --- a/src/atlas.cpp +++ b/src/atlas.cpp @@ -202,6 +202,11 @@ qreal Atlas::zoomFit(const QSize &size, const QRectF &br) { _zoom = 0; + if (br.isNull()) { + _zoom = _zooms.size() - 1; + return _zoom; + } + for (int z = 0; z < _zooms.count(); z++) { for (int i = _zooms.at(z).first; i <= _zooms.at(z).second; i++) { if (!_bounds.at(i).first.contains(_maps.at(i)->ll2pp(br.center())))