1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Fixed broken scene centering in some resize cases

This commit is contained in:
Martin Tůma 2017-12-07 21:05:00 +01:00
parent 53229681d2
commit 53a4b45b7b

View File

@ -750,13 +750,13 @@ void MapView::drawBackground(QPainter *painter, const QRectF &rect)
void MapView::resizeEvent(QResizeEvent *event) void MapView::resizeEvent(QResizeEvent *event)
{ {
QGraphicsView::resizeEvent(event);
qreal zoom = _map->zoom(); qreal zoom = _map->zoom();
if (mapZoom() != zoom) if (mapZoom() != zoom)
rescale(); rescale();
centerOn(contentCenter()); centerOn(contentCenter());
QGraphicsView::resizeEvent(event);
} }
void MapView::paintEvent(QPaintEvent *event) void MapView::paintEvent(QPaintEvent *event)