Skip to content

Commit

Permalink
Fix crash on deleting page
Browse files Browse the repository at this point in the history
  • Loading branch information
WandererFan authored and wwmayer committed Dec 4, 2016
1 parent f036438 commit fa738e3
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/Mod/TechDraw/Gui/MDIViewPage.cpp
Expand Up @@ -180,19 +180,6 @@ MDIViewPage::MDIViewPage(ViewProviderPage *pageVp, Gui::Document* doc, QWidget*

MDIViewPage::~MDIViewPage()
{
// Safely remove graphicview items that have built up TEMP SOLUTION
for(auto it : deleteItems) {
auto qObjPtr( dynamic_cast<QObject *>(it) );
if (qObjPtr) {
qObjPtr->deleteLater();
} else {
delete it;
}
}
deleteItems.clear();

//m_view will be deleted by MDIViewPage as a Qt child
//delete m_view;
}


Expand Down Expand Up @@ -403,7 +390,6 @@ void MDIViewPage::updateDrawing(bool forceUpdate)
Base::Console().Log("ERROR - MDIViewPage::updateDrawing - %s already removed from QGraphicsScene\n",
(*itGraphics)->getViewName());
}
deleteItems.append(*itGraphics); // delete in the destructor when completly safe. TEMP SOLUTION
}
itGraphics++;
}
Expand Down

0 comments on commit fa738e3

Please sign in to comment.