mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-02-20 17:50:49 +01:00
The true cause of the map switch offset...
This commit is contained in:
parent
bb10f7c0e1
commit
e1532b978f
@ -287,10 +287,9 @@ void MapView::setMap(Map *map)
|
||||
it.value()->setMap(_map);
|
||||
updatePOIVisibility();
|
||||
|
||||
QPointF oc = vr.center();
|
||||
QPointF nc = _map->ll2xy(cr.center());
|
||||
if (qAbs(oc.x() - nc.x()) >= 1.0 || qAbs(oc.y() - nc.y()) >= 1.0)
|
||||
centerOn(nc);
|
||||
QPointF nc = QRectF(_map->ll2xy(cr.topLeft()),
|
||||
_map->ll2xy(cr.bottomRight())).center();
|
||||
centerOn(nc);
|
||||
|
||||
resetCachedContent();
|
||||
QPixmapCache::clear();
|
||||
|
Loading…
x
Reference in New Issue
Block a user