1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-02-17 16:20:48 +01:00

Enable loading of GMAP maps when Garmin BaseCamp has associated them

This commit is contained in:
Martin Tůma 2020-02-12 09:37:03 +01:00
parent 187cb77858
commit 8d06ab6208
2 changed files with 8 additions and 5 deletions

View File

@ -1325,7 +1325,10 @@ bool GUI::loadMap(const QString &fileName)
if (fileName.isEmpty()) if (fileName.isEmpty())
return false; return false;
if (_ml->loadFile(fileName)) { QFileInfo fi(fileName);
bool res = fi.isDir() ? _ml->loadDir(fileName) : _ml->loadFile(fileName);
if (res) {
QAction *a = createMapAction(_ml->maps().last()); QAction *a = createMapAction(_ml->maps().last());
_mapMenu->insertAction(_mapsEnd, a); _mapMenu->insertAction(_mapsEnd, a);
_showMapAction->setEnabled(true); _showMapAction->setEnabled(true);

View File

@ -130,8 +130,8 @@ QString MapList::formats()
{ {
return return
tr("Supported files") tr("Supported files")
+ " (*.img *.jnx *.map *.mbtiles *.rmap *.rtmap *.tar *.tba *.tif *.tiff *.xml);;" + " (*.gmap *.gmapi *.img *.jnx *.map *.mbtiles *.rmap *.rtmap *.tar *.tba *.tif *.tiff *.xml);;"
+ tr("Garmin IMG maps") + " (*.img *.xml);;" + tr("Garmin IMG maps") + " (*.gmap *.gmapi *.img *.xml);;"
+ tr("Garmin JNX maps") + " (*.jnx);;" + tr("Garmin JNX maps") + " (*.jnx);;"
+ tr("OziExplorer maps") + " (*.map);;" + tr("OziExplorer maps") + " (*.map);;"
+ tr("MBTiles maps") + " (*.mbtiles);;" + tr("MBTiles maps") + " (*.mbtiles);;"
@ -144,7 +144,7 @@ QString MapList::formats()
QStringList MapList::filter() QStringList MapList::filter()
{ {
QStringList filter; QStringList filter;
filter << "*.img" << "*.jnx" << "*.map" << "*.tba" << "*.tar" << "*.xml" filter << "*.img" << "*.jnx" << "*.map" << "*.mbtiles" << "*.rmap"
<< "*.tif" << "*.tiff" << "*.mbtiles" << "*.rmap" << "*.rtmap" << "*.img"; << "*.rtmap" << "*.tar" << "*.tba" << "*.tif" << "*.tiff" << "*.xml";
return filter; return filter;
} }