1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Enable the hillshading action only for maps that actually use it

This commit is contained in:
Martin Tůma 2024-02-28 07:54:08 +01:00
parent f0d5a32dca
commit 112cfe6391

View File

@ -471,6 +471,7 @@ void GUI::createActions()
_drawHillShadingAction = new QAction(tr("Show hillshading"), this); _drawHillShadingAction = new QAction(tr("Show hillshading"), this);
_drawHillShadingAction->setMenuRole(QAction::NoRole); _drawHillShadingAction->setMenuRole(QAction::NoRole);
_drawHillShadingAction->setCheckable(true); _drawHillShadingAction->setCheckable(true);
_drawHillShadingAction->setEnabled(false);
connect(_drawHillShadingAction, &QAction::triggered, _mapView, connect(_drawHillShadingAction, &QAction::triggered, _mapView,
&MapView::drawHillShading); &MapView::drawHillShading);
@ -2248,6 +2249,7 @@ void GUI::updateMapDEMDownloadAction()
{ {
_downloadMapDEMAction->setEnabled(!_dem->url().isEmpty() _downloadMapDEMAction->setEnabled(!_dem->url().isEmpty()
&& _map->usesDEM() && !_dem->checkTiles(_map->llBounds())); && _map->usesDEM() && !_dem->checkTiles(_map->llBounds()));
_drawHillShadingAction->setEnabled(_map->usesDEM());
} }
void GUI::setTimeType(TimeType type) void GUI::setTimeType(TimeType type)