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())))