Skip to content

Commit

Permalink
Fix items are removed from scene twice
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 6, 2017
1 parent 5796b89 commit b04c101
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/layout/qgslayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,11 @@ void QgsLayout::addLayoutItemPrivate( QgsLayoutItem *item )
void QgsLayout::removeLayoutItemPrivate( QgsLayoutItem *item )
{
mItemsModel->setItemRemoved( item );
removeItem( item );
// small chance that item is still in a scene - the model may have
// rejected the removal for some reason. This is probably not necessary,
// but can't hurt...
if ( item->scene() )
removeItem( item );
#if 0 //TODO
emit itemRemoved( item );
#endif
Expand Down

0 comments on commit b04c101

Please sign in to comment.