Skip to content

Commit

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

Fixes #29821
  • Loading branch information
elpaso committed May 28, 2019
1 parent e7f8f2b commit 20f1acb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/layout/qgslayoutdesignerdialog.cpp
Expand Up @@ -966,7 +966,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 20f1acb

Please sign in to comment.