diff --git a/src/sourcetree/items/ScriptCollectionItem.cpp b/src/sourcetree/items/ScriptCollectionItem.cpp index c686340f9..920b01ca5 100644 --- a/src/sourcetree/items/ScriptCollectionItem.cpp +++ b/src/sourcetree/items/ScriptCollectionItem.cpp @@ -34,7 +34,6 @@ ScriptCollectionItem::~ScriptCollectionItem() { model()->removeSourceItemLink( this ); ViewManager::instance()->destroyPage( m_page ); - dynamic_cast< QObject* >( m_page )->deleteLater(); } diff --git a/src/sourcetree/items/TemporaryPageItem.cpp b/src/sourcetree/items/TemporaryPageItem.cpp index 0bd153d71..109c6f317 100644 --- a/src/sourcetree/items/TemporaryPageItem.cpp +++ b/src/sourcetree/items/TemporaryPageItem.cpp @@ -126,8 +126,6 @@ TemporaryPageItem::IDValue() const void TemporaryPageItem::removeFromList() { - ViewManager::instance()->destroyPage( m_page ); - model()->removeSourceItemLink( this ); int idx = parent()->children().indexOf( this ); @@ -137,7 +135,7 @@ TemporaryPageItem::removeFromList() emit removed(); - delete m_page; + ViewManager::instance()->destroyPage( m_page ); deleteLater(); }