mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
Cosmetics
This commit is contained in:
parent
5f5b391cd9
commit
b72a9e67fe
@ -1017,18 +1017,16 @@ void MapView::setDevicePixelRatio(qreal deviceRatio, qreal mapRatio)
|
|||||||
|
|
||||||
void MapView::setProjection(int id)
|
void MapView::setProjection(int id)
|
||||||
{
|
{
|
||||||
|
const PCS *pcs;
|
||||||
|
const GCS *gcs;
|
||||||
Coordinates center = _map->xy2ll(mapToScene(viewport()->rect().center()));
|
Coordinates center = _map->xy2ll(mapToScene(viewport()->rect().center()));
|
||||||
|
|
||||||
const PCS *pcs = PCS::pcs(id);
|
if ((pcs = PCS::pcs(id)))
|
||||||
if (pcs)
|
|
||||||
_projection = Projection(pcs);
|
_projection = Projection(pcs);
|
||||||
else {
|
else if ((gcs = GCS::gcs(id)))
|
||||||
const GCS *gcs = GCS::gcs(id);
|
_projection = Projection(gcs);
|
||||||
if (gcs)
|
else
|
||||||
_projection = Projection(gcs);
|
qWarning("%d: Unknown PCS/GCS id", id);
|
||||||
else
|
|
||||||
qWarning("%d: Unknown PCS/GCS id", id);
|
|
||||||
}
|
|
||||||
|
|
||||||
_map->setProjection(_projection);
|
_map->setProjection(_projection);
|
||||||
rescale();
|
rescale();
|
||||||
|
Loading…
Reference in New Issue
Block a user