Skip to content

Commit d5552cd

Browse files
committedSep 4, 2017
Auto close item properties widget when item is deleted
1 parent ddb3198 commit d5552cd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎src/app/layout/qgslayoutdesignerdialog.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,14 @@ void QgsLayoutDesignerDialog::showItemOptions( QgsLayoutItem *item )
357357

358358
delete mItemPropertiesStack->takeMainPanel();
359359
widget->setDockMode( true );
360+
connect( item, &QgsLayoutItem::destroyed, widget.get(), [this]
361+
{
362+
delete mItemPropertiesStack->takeMainPanel();
363+
} );
364+
360365
mItemPropertiesStack->setMainPanel( widget.release() );
361366
mItemDock->setUserVisible( true );
367+
362368
}
363369

364370
void QgsLayoutDesignerDialog::open()

0 commit comments

Comments
 (0)
Please sign in to comment.