1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-27 11:39:16 +02:00

Enable loading of GMAP maps when Garmin BaseCamp has associated them

This commit is contained in:
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);