mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 11:45:53 +01:00
Fixed 1px map change offset & invalid zoom level
This commit is contained in:
parent
9e36451001
commit
55458b04a6
@ -287,7 +287,10 @@ void MapView::setMap(Map *map)
|
||||
it.value()->setMap(_map);
|
||||
updatePOIVisibility();
|
||||
|
||||
centerOn(_map->ll2xy(cr.center()));
|
||||
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);
|
||||
|
||||
resetCachedContent();
|
||||
QPixmapCache::clear();
|
||||
|
Loading…
Reference in New Issue
Block a user