1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +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())
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());
_mapMenu->insertAction(_mapsEnd, a);
_showMapAction->setEnabled(true);

View File

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