mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +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);
|
it.value()->setMap(_map);
|
||||||
updatePOIVisibility();
|
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();
|
resetCachedContent();
|
||||||
QPixmapCache::clear();
|
QPixmapCache::clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user