Move prepareForDelete() to Rim3dView

This commit is contained in:
Magne Sjaastad 2023-01-11 12:29:46 +01:00
parent bfbe557c2d
commit a2e73d7cee
2 changed files with 4 additions and 3 deletions

View File

@ -65,9 +65,6 @@ void RicDeleteItemExec::redo()
m_commandData.m_deletedObjectAsXml = xmlObj( obj )->writeObjectToXmlString();
}
// Make sure the object is disconnected from other objects before delete
obj->prepareForDelete();
delete obj;
listField->erase( m_commandData.m_indexToObject );

View File

@ -235,6 +235,10 @@ Rim3dView::~Rim3dView()
{
m_viewer->clearRimView();
}
// Make sure the object is disconnected from other objects before delete
prepareForDelete();
removeMdiWindowFromMdiArea();
delete m_viewer;