mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 11:45:53 +01:00
Replace global data sources with user data sources rather than merging them
This commit is contained in:
parent
501431207f
commit
1928b579ab
12
src/gui.cpp
12
src/gui.cpp
@ -96,17 +96,23 @@ GUI::GUI(QWidget *parent) : QMainWindow(parent)
|
||||
|
||||
void GUI::loadMaps()
|
||||
{
|
||||
if (QFile::exists(USER_MAP_FILE))
|
||||
_maps = MapList::load(this, USER_MAP_FILE);
|
||||
_maps += MapList::load(this, GLOBAL_MAP_FILE);
|
||||
else
|
||||
_maps = MapList::load(this, GLOBAL_MAP_FILE);
|
||||
}
|
||||
|
||||
void GUI::loadPOIs()
|
||||
{
|
||||
QFileInfoList list;
|
||||
QDir userDir(USER_POI_DIR);
|
||||
QDir globalDir(GLOBAL_POI_DIR);
|
||||
|
||||
QFileInfoList list = userDir.entryInfoList(QStringList(), QDir::Files)
|
||||
+ globalDir.entryInfoList(QStringList(), QDir::Files);
|
||||
if (userDir.exists())
|
||||
list = userDir.entryInfoList(QStringList(), QDir::Files);
|
||||
else
|
||||
list = globalDir.entryInfoList(QStringList(), QDir::Files);
|
||||
|
||||
for (int i = 0; i < list.size(); ++i)
|
||||
_poi.loadFile(list.at(i).absoluteFilePath());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user