Skip to content

Commit

Permalink
Ensure the designer dialog is deleted immediately
Browse files Browse the repository at this point in the history
Before other signals can crash the application.

Fixes #29821
  • Loading branch information
elpaso committed May 28, 2019
1 parent f62eee9 commit 2372f9e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/layout/qgslayoutdesignerdialog.cpp
Expand Up @@ -935,7 +935,11 @@ void QgsLayoutDesignerDialog::setMasterLayout( QgsMasterLayoutInterface *layout

QObject *obj = dynamic_cast< QObject * >( mMasterLayout );
if ( obj )
connect( obj, &QObject::destroyed, this, &QgsLayoutDesignerDialog::close );
connect( obj, &QObject::destroyed, [ = ]
{
this->close();
QgsApplication::sendPostedEvents( nullptr, QEvent::DeferredDelete );
} );

setTitle( mMasterLayout->name() );

Expand Down

0 comments on commit 2372f9e

Please sign in to comment.