From 53a4b45b7b4162449e435d67b4bfdd736715c068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Thu, 7 Dec 2017 21:05:00 +0100 Subject: [PATCH] Fixed broken scene centering in some resize cases --- src/GUI/mapview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GUI/mapview.cpp b/src/GUI/mapview.cpp index 7b1156e1..f34bb771 100644 --- a/src/GUI/mapview.cpp +++ b/src/GUI/mapview.cpp @@ -750,13 +750,13 @@ void MapView::drawBackground(QPainter *painter, const QRectF &rect) void MapView::resizeEvent(QResizeEvent *event) { + QGraphicsView::resizeEvent(event); + qreal zoom = _map->zoom(); if (mapZoom() != zoom) rescale(); centerOn(contentCenter()); - - QGraphicsView::resizeEvent(event); } void MapView::paintEvent(QPaintEvent *event)