Warn if Anchor view deleted in Projection Group

This commit is contained in:
WandererFan
2017-01-06 09:36:03 -05:00
parent af4bedf441
commit 221f80e344
3 changed files with 19 additions and 5 deletions

View File

@@ -160,6 +160,19 @@ double DrawProjGroupItem::getRotateAngle()
return angle;
}
void DrawProjGroupItem::unsetupObject()
{
if (getGroup() != nullptr) {
if (getGroup()->hasProjection(Type.getValueAsString()) ) {
if (getGroup()->getAnchor() == this) {
Base::Console().Warning("Warning - DPG (%s/%s) may be corrupt - Anchor deleted\n",
getGroup()->getNameInDocument(),getGroup()->Label.getValue());
getGroup()->Anchor.setValue(nullptr);
}
}
}
}
PyObject *DrawProjGroupItem::getPyObject(void)
{
if (PythonObject.is(Py::_None())) {