Skip to content

Commit

Permalink
Move prepareForDelete() to Rim3dView
Browse files Browse the repository at this point in the history
  • Loading branch information
magnesj committed Jan 11, 2023
1 parent bfbe557 commit a2e73d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions ApplicationLibCode/Commands/RicDeleteItemExec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
4 changes: 4 additions & 0 deletions ApplicationLibCode/ProjectDataModel/Rim3dView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a2e73d7

Please sign in to comment.