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:
@@ -217,14 +217,14 @@ int QGVPage::removeQView(QGIView *view)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int QGVPage::removeQViewByDrawView(const TechDraw::DrawView* dv)
|
||||
int QGVPage::removeQViewByName(const char* name)
|
||||
{
|
||||
std::vector<QGIView*> items = getViews();
|
||||
QString qsName = QString::fromUtf8(dv->getNameInDocument());
|
||||
QString qsName = QString::fromUtf8(name);
|
||||
bool found = false;
|
||||
QGIView* ourItem = nullptr;
|
||||
for (auto& i:items) {
|
||||
if (qsName == i->data(1).toString()) { //is there really a QGIV for this DV in scene?
|
||||
if (qsName == i->data(1).toString()) { //is there a QGIV with this name in scene?
|
||||
found = true;
|
||||
ourItem = i;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user