Skip to content

Commit

Permalink
qgs3dmapconfigwidget: Only display shadow debug map if shadows are en…
Browse files Browse the repository at this point in the history
…abled

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.
  • Loading branch information
ptitjano authored and lbartoletti committed Jun 28, 2024
1 parent e27b126 commit 6246369
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/3d/qgs3dmapconfigwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,9 @@ void Qgs3DMapConfigWidget::apply()
mMap->setViewFrustumVisualizationEnabled( mVisualizeExtentCheckBox->isChecked() );

mMap->setDebugDepthMapSettings( mDebugDepthMapGroupBox->isChecked(), static_cast<Qt::Corner>( mDebugDepthMapCornerComboBox->currentIndex() ), mDebugDepthMapSizeSpinBox->value() );
mMap->setDebugShadowMapSettings( mDebugShadowMapGroupBox->isChecked(), static_cast<Qt::Corner>( 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<Qt::Corner>( mDebugShadowMapCornerComboBox->currentIndex() ), mDebugShadowMapSizeSpinBox->value() );
}

void Qgs3DMapConfigWidget::onTerrainTypeChanged()
Expand Down

0 comments on commit 6246369

Please sign in to comment.