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.
This commit is contained in:
Jean Felder 2025-08-12 09:23:31 +02:00 committed by Nyall Dawson
parent 6a856d08b6
commit 5d379cd75f

View File

@ -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()