Fix #3224 Seg Fault in DrawProjGroup
- QGIViews for DrawProjGroupItem were not being deleted since DPGI belongs to DPG, not DrawPage. Since there is a 1 to 1 relationship between MDIViewPage and DrawPage, the check for membership in DrawPage is unnecessary.
This commit is contained in:
@@ -339,14 +339,9 @@ bool MDIViewPage::attachView(App::DocumentObject *obj)
|
||||
|
||||
void MDIViewPage::onDeleteObject(const App::DocumentObject& obj)
|
||||
{
|
||||
//if this page has a QView for this obj, delete it.
|
||||
if (obj.isDerivedFrom(TechDraw::DrawView::getClassTypeId())) {
|
||||
const App::DocumentObject* objPtr = &obj;
|
||||
const TechDraw::DrawView* dv = static_cast<const TechDraw::DrawView*>(objPtr);
|
||||
TechDraw::DrawPage* dvPg = dv->findParentPage();
|
||||
if (dvPg == m_vpPage->getDrawPage()) {
|
||||
//this is a DV that is on our page
|
||||
(void) m_view->removeQViewByDrawView(dv);
|
||||
}
|
||||
(void) m_view->removeQViewByName(obj.getNameInDocument());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user