From bc06a0187a4712e3480a0cb27abea4f0a336d028 Mon Sep 17 00:00:00 2001 From: Jean Felder Date: Fri, 3 May 2024 18:50:42 +0200 Subject: [PATCH] qgs3dmapconfigwidget: Only display shadow debug map if shadows are enabled The shadow debug map can be enabled from the configuration widget even if the shadow effect is not enabled. In that case, the displayed shadow map does not make it any sense. This issue is fixed by displaying the shadow debug map only if the shadow effect is enabled. --- src/app/3d/qgs3dmapconfigwidget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/3d/qgs3dmapconfigwidget.cpp b/src/app/3d/qgs3dmapconfigwidget.cpp index 664297a52ca2..cd57a30880ec 100644 --- a/src/app/3d/qgs3dmapconfigwidget.cpp +++ b/src/app/3d/qgs3dmapconfigwidget.cpp @@ -385,7 +385,9 @@ void Qgs3DMapConfigWidget::apply() mMap->setViewFrustumVisualizationEnabled( mVisualizeExtentCheckBox->isChecked() ); mMap->setDebugDepthMapSettings( mDebugDepthMapGroupBox->isChecked(), static_cast( mDebugDepthMapCornerComboBox->currentIndex() ), mDebugDepthMapSizeSpinBox->value() ); - mMap->setDebugShadowMapSettings( mDebugShadowMapGroupBox->isChecked(), static_cast( mDebugShadowMapCornerComboBox->currentIndex() ), mDebugShadowMapSizeSpinBox->value() ); + + // Do not display the shadow debug map if the shadow effect is not enabled. + mMap->setDebugShadowMapSettings( mDebugShadowMapGroupBox->isChecked() && groupShadowRendering->isChecked(), static_cast( mDebugShadowMapCornerComboBox->currentIndex() ), mDebugShadowMapSizeSpinBox->value() ); } void Qgs3DMapConfigWidget::onTerrainTypeChanged()