mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 11:45:53 +01:00
Fixed broken scene centering in some resize cases
This commit is contained in:
parent
53229681d2
commit
53a4b45b7b
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user