mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
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:
parent
6a856d08b6
commit
5d379cd75f
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user