Fix crash due to QGraphicsScene update while View.isDeleting()
This commit is contained in:
@@ -385,6 +385,9 @@ void MDIViewPage::updateDrawing(bool forceUpdate)
|
||||
|
||||
// if dv doesn't have a graphic, make one
|
||||
for (auto& dv: pChildren) {
|
||||
if (dv->isDeleting()) {
|
||||
continue;
|
||||
}
|
||||
QGIView* qv = m_view->findQViewForDocObj(dv);
|
||||
if (qv == nullptr) {
|
||||
attachView(dv);
|
||||
@@ -1059,19 +1062,17 @@ void MDIViewPage::selectionChanged()
|
||||
static_cast<void> (Gui::Selection().addSelection(dimObj->getDocument()->getName(),dimObj->getNameInDocument()));
|
||||
}
|
||||
} else {
|
||||
|
||||
TechDraw::DrawView *viewObj = itemView->getViewObject();
|
||||
if (viewObj && !viewObj->isDeleting()) {
|
||||
std::string doc_name = viewObj->getDocument()->getName();
|
||||
std::string obj_name = viewObj->getNameInDocument();
|
||||
|
||||
std::string doc_name = viewObj->getDocument()->getName();
|
||||
std::string obj_name = viewObj->getNameInDocument();
|
||||
|
||||
Gui::Selection().addSelection(doc_name.c_str(), obj_name.c_str());
|
||||
showStatusMsg(doc_name.c_str(),
|
||||
obj_name.c_str(),
|
||||
"");
|
||||
|
||||
Gui::Selection().addSelection(doc_name.c_str(), obj_name.c_str());
|
||||
showStatusMsg(doc_name.c_str(),
|
||||
obj_name.c_str(),
|
||||
"");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
blockConnection(saveBlock);
|
||||
|
||||
Reference in New Issue
Block a user