1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-30 22:51:16 +01:00

Fixed broken zoom rectangle computation

This commit is contained in:
Martin Tůma 2018-03-10 21:04:14 +01:00
parent bcd14726f3
commit 1d3d1aa5b7

View File

@ -258,7 +258,8 @@ void MapView::setPalette(const Palette &palette)
void MapView::setMap(Map *map)
{
QRectF vr(mapToScene(viewport()->rect()).boundingRect());
QRectF vr(mapToScene(viewport()->rect()).boundingRect()
.intersected(_map->bounds()));
RectC cr(_map->xy2ll(vr.topLeft()), _map->xy2ll(vr.bottomRight()));
_map->unload();