From 1d3d1aa5b78a046a8ea65168dd1c825e79499399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 10 Mar 2018 21:04:14 +0100 Subject: [PATCH] Fixed broken zoom rectangle computation --- src/GUI/mapview.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/GUI/mapview.cpp b/src/GUI/mapview.cpp index 51381571..2e06d397 100644 --- a/src/GUI/mapview.cpp +++ b/src/GUI/mapview.cpp @@ -258,7 +258,8 @@ void MapView::setPalette(const Palette &palette) void MapView::setMap(Map *map) { - QRectF vr(mapToScene(viewport()->rect()).boundingRect()); + QRectF vr(mapToScene(viewport()->rect()).boundingRect() + .intersected(_map->bounds())); RectC cr(_map->xy2ll(vr.topLeft()), _map->xy2ll(vr.bottomRight())); _map->unload();