Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #29968 from elpaso/bugfix-gh29821-layout-crash-py
Browse files Browse the repository at this point in the history
QgsLayoutAtlasWidget: Disconnect signals when layout RIP
  • Loading branch information
elpaso committed May 28, 2019
2 parents bede196 + 47f739c commit 4b35d85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/layout/qgslayoutatlaswidget.cpp
Expand Up @@ -63,7 +63,7 @@ QgsLayoutAtlasWidget::QgsLayoutAtlasWidget( QWidget *parent, QgsPrintLayout *lay
{
mAtlasFileFormat->addItem( QString( formats.at( i ) ) );
}
connect( mAtlasFileFormat, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, [ = ]( int ) { changeFileFormat(); } );
connect( mAtlasFileFormat, qgis::overload<int>::of( &QComboBox::currentIndexChanged ), this, [ = ]( int ) { changeFileFormat(); } );

updateGuiElements();
}
Expand Down
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 4b35d85

Please sign in to comment.