From 112cfe639112c6e9b89ac404a278a78e4f8b366b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Wed, 28 Feb 2024 07:54:08 +0100 Subject: [PATCH] Enable the hillshading action only for maps that actually use it --- src/GUI/gui.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/GUI/gui.cpp b/src/GUI/gui.cpp index 6b43451f..628f9809 100644 --- a/src/GUI/gui.cpp +++ b/src/GUI/gui.cpp @@ -471,6 +471,7 @@ void GUI::createActions() _drawHillShadingAction = new QAction(tr("Show hillshading"), this); _drawHillShadingAction->setMenuRole(QAction::NoRole); _drawHillShadingAction->setCheckable(true); + _drawHillShadingAction->setEnabled(false); connect(_drawHillShadingAction, &QAction::triggered, _mapView, &MapView::drawHillShading); @@ -2248,6 +2249,7 @@ void GUI::updateMapDEMDownloadAction() { _downloadMapDEMAction->setEnabled(!_dem->url().isEmpty() && _map->usesDEM() && !_dem->checkTiles(_map->llBounds())); + _drawHillShadingAction->setEnabled(_map->usesDEM()); } void GUI::setTimeType(TimeType type)