Commit 261bb51a authored by Jochen Becher's avatar Jochen Becher

Modeling: Fix a crash due to wrong order of clearing diagram

Change-Id: Ibd25f230e408303f10d273d1e8d3e8c3539fbd69
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent 8dfd2613
......@@ -851,16 +851,16 @@ void DiagramSceneModel::onSelectionChanged()
void DiagramSceneModel::clearGraphicsScene()
{
// save extra items from being deleted
removeExtraSceneItems();
m_graphicsScene->clear();
addExtraSceneItems();
m_graphicsItems.clear();
m_itemToElementMap.clear();
m_elementToItemMap.clear();
m_selectedItems.clear();
m_secondarySelectedItems.clear();
m_focusItem = 0;
// save extra items from being deleted
removeExtraSceneItems();
m_graphicsScene->clear();
addExtraSceneItems();
}
void DiagramSceneModel::removeExtraSceneItems()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment