From 5d379cd75fbdc084b74178542e833582e89df954 Mon Sep 17 00:00:00 2001 From: Jean Felder Date: Tue, 12 Aug 2025 09:23:31 +0200 Subject: [PATCH] qgs3dmapcanvaswidget: Correctly synchronize checked actions The actions checked status are updated once the configuration dialog is shown based on the current 3d map settings. However, these settings may be updated by the configuration dialog. This means that the actions need to be updated if the dialog is accepted instead. --- src/app/3d/qgs3dmapcanvaswidget.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/3d/qgs3dmapcanvaswidget.cpp b/src/app/3d/qgs3dmapcanvaswidget.cpp index 4d834a4aaf0..bbb801d5abd 100644 --- a/src/app/3d/qgs3dmapcanvaswidget.cpp +++ b/src/app/3d/qgs3dmapcanvaswidget.cpp @@ -792,11 +792,14 @@ void Qgs3DMapCanvasWidget::configure() }; connect( buttons, &QDialogButtonBox::rejected, mConfigureDialog, &QDialog::reject ); - connect( buttons, &QDialogButtonBox::clicked, mConfigureDialog, [this, buttons, applyConfig]( QAbstractButton *button ) { + connect( buttons, &QDialogButtonBox::clicked, mConfigureDialog, [this, buttons, applyConfig, map]( QAbstractButton *button ) { if ( button == buttons->button( QDialogButtonBox::Apply ) || button == buttons->button( QDialogButtonBox::Ok ) ) applyConfig(); if ( button == buttons->button( QDialogButtonBox::Ok ) ) + { mConfigureDialog->accept(); + updateCheckedActionsFromMapSettings( map ); + } } ); connect( buttons, &QDialogButtonBox::helpRequested, w, []() { QgsHelp::openHelp( QStringLiteral( "map_views/3d_map_view.html#scene-configuration" ) ); } ); @@ -810,8 +813,6 @@ void Qgs3DMapCanvasWidget::configure() layout->addWidget( buttons ); mConfigureDialog->show(); - - updateCheckedActionsFromMapSettings( map ); } void Qgs3DMapCanvasWidget::exportScene()