mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-30 22:51:16 +01:00
Improved map view map init
This commit is contained in:
parent
6809853a8a
commit
d3193abd0b
@ -187,7 +187,7 @@ void GUI::loadMaps()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_map = _ml->maps().isEmpty() ? new EmptyMap(this) : _ml->maps().first();
|
_map = new EmptyMap(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GUI::loadPOIs()
|
void GUI::loadPOIs()
|
||||||
@ -1711,9 +1711,7 @@ void GUI::readSettings()
|
|||||||
_showMapAction->setChecked(true);
|
_showMapAction->setChecked(true);
|
||||||
if (_ml->maps().count()) {
|
if (_ml->maps().count()) {
|
||||||
int index = mapIndex(settings.value(CURRENT_MAP_SETTING).toString());
|
int index = mapIndex(settings.value(CURRENT_MAP_SETTING).toString());
|
||||||
_mapActions.at(index)->setChecked(true);
|
_mapActions.at(index)->trigger();
|
||||||
_map = _ml->maps().at(index);
|
|
||||||
_pathView->setMap(_map);
|
|
||||||
}
|
}
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
|
@ -43,8 +43,10 @@ PathView::PathView(Map *map, POI *poi, QWidget *parent)
|
|||||||
_scene->addItem(_mapScale);
|
_scene->addItem(_mapScale);
|
||||||
|
|
||||||
_map = map;
|
_map = map;
|
||||||
_poi = poi;
|
_map->load();
|
||||||
connect(_map, SIGNAL(loaded()), this, SLOT(reloadMap()));
|
connect(_map, SIGNAL(loaded()), this, SLOT(reloadMap()));
|
||||||
|
|
||||||
|
_poi = poi;
|
||||||
connect(_poi, SIGNAL(pointsChanged()), this, SLOT(updatePOI()));
|
connect(_poi, SIGNAL(pointsChanged()), this, SLOT(updatePOI()));
|
||||||
|
|
||||||
_units = Metric;
|
_units = Metric;
|
||||||
|
Loading…
Reference in New Issue
Block a user