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 authored and nyalldawson committed May 28, 2019
1 parent 062f963 commit f976b88
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 f976b88

Please sign in to comment.