mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +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()
|
||||
@ -1711,9 +1711,7 @@ void GUI::readSettings()
|
||||
_showMapAction->setChecked(true);
|
||||
if (_ml->maps().count()) {
|
||||
int index = mapIndex(settings.value(CURRENT_MAP_SETTING).toString());
|
||||
_mapActions.at(index)->setChecked(true);
|
||||
_map = _ml->maps().at(index);
|
||||
_pathView->setMap(_map);
|
||||
_mapActions.at(index)->trigger();
|
||||
}
|
||||
settings.endGroup();
|
||||
|
||||
|
@ -43,8 +43,10 @@ PathView::PathView(Map *map, POI *poi, QWidget *parent)
|
||||
_scene->addItem(_mapScale);
|
||||
|
||||
_map = map;
|
||||
_poi = poi;
|
||||
_map->load();
|
||||
connect(_map, SIGNAL(loaded()), this, SLOT(reloadMap()));
|
||||
|
||||
_poi = poi;
|
||||
connect(_poi, SIGNAL(pointsChanged()), this, SLOT(updatePOI()));
|
||||
|
||||
_units = Metric;
|
||||
|
Loading…
Reference in New Issue
Block a user