1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-01-18 19:52:09 +01:00

Added missing coordinates bounding rectangle normalization

(Fixes issue #19)
This commit is contained in:
Martin Tůma 2017-02-03 00:54:57 +01:00
parent cd89706d74
commit 214d7c40dc

View File

@ -64,6 +64,7 @@ QPair<Coordinates, Coordinates> Coordinates::boundingRect(qreal distance) const
maxLon = MAX_LON;
}
return QPair<Coordinates, Coordinates>(Coordinates(rad2deg(minLon),
rad2deg(minLat)), Coordinates(rad2deg(maxLon), rad2deg(maxLat)));
return QPair<Coordinates, Coordinates>(Coordinates(rad2deg(qMin(minLon,
maxLon)), rad2deg(qMin(minLat, maxLat))), Coordinates(rad2deg(qMax(minLon,
maxLon)), rad2deg(qMax(minLat, maxLat))));
}