Skip to content

Commit 20f1acb

Browse files
committedMay 28, 2019
Ensure the designer dialog is deleted immediately
Before other signals can crash the application. Fixes #29821
1 parent e7f8f2b commit 20f1acb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎src/app/layout/qgslayoutdesignerdialog.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,11 @@ void QgsLayoutDesignerDialog::setMasterLayout( QgsMasterLayoutInterface *layout
966966

967967
QObject *obj = dynamic_cast< QObject * >( mMasterLayout );
968968
if ( obj )
969-
connect( obj, &QObject::destroyed, this, &QgsLayoutDesignerDialog::close );
969+
connect( obj, &QObject::destroyed, [ = ]
970+
{
971+
this->close();
972+
QgsApplication::sendPostedEvents( nullptr, QEvent::DeferredDelete );
973+
} );
970974

971975
setTitle( mMasterLayout->name() );
972976

0 commit comments

Comments
 (0)
Please sign in to comment.