From 226162eca1d5330f4e7eb86b200d2ec6ce4bffd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Tue, 6 May 2025 20:39:18 +0200 Subject: [PATCH] Remove the restriction on the reload action on DEM/map dir load "Reload" will now behave like "close" when only the mapdir/DEMs are loaded, but when the DEMs and some other data is opened, reload will help the user to get rid of the DEMs and leave the other data. --- src/GUI/gui.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/GUI/gui.cpp b/src/GUI/gui.cpp index a3f24162..1f3bf9b4 100644 --- a/src/GUI/gui.cpp +++ b/src/GUI/gui.cpp @@ -1075,7 +1075,6 @@ bool GUI::openFile(const QString &fileName, bool tryUnknown, int &showError) if (url.scheme() == "geo") { if (loadURL(url, showError)) { _fileActionGroup->setEnabled(true); - _reloadFileAction->setEnabled(false); return true; } else if (showError) return false; @@ -1098,8 +1097,6 @@ bool GUI::openFile(const QString &fileName, bool tryUnknown, int &showError) _browser->setCurrent(path); #endif // Q_OS_ANDROID _fileActionGroup->setEnabled(true); - // Explicitly enable the reload action as it may be disabled by loadMapDir() - _reloadFileAction->setEnabled(true); _navigationActionGroup->setEnabled(true); updateNavigationActions(); @@ -2025,7 +2022,6 @@ void GUI::loadMapDir() _mapDir = fi.absolutePath(); _fileActionGroup->setEnabled(true); - _reloadFileAction->setEnabled(false); } void GUI::clearMapCache() @@ -2087,11 +2083,8 @@ void GUI::showDEMTiles() QMessageBox::information(this, APP_NAME, tr("No local DEM tiles found.")); } else { _mapView->loadDEMs(tiles); - _areaCount += tiles.size(); - _fileActionGroup->setEnabled(true); - _reloadFileAction->setEnabled(false); } }