subDoc(*aSubIter)->close(theForever);
// close for thid document needs no transaction in this document
- if (this == aPM->moduleDocument().get())
- std::static_pointer_cast<Model_Session>(Model_Session::get())->setCheckTransactions(false);
+ std::static_pointer_cast<Model_Session>(Model_Session::get())->setCheckTransactions(false);
// delete all features of this document
std::shared_ptr<ModelAPI_Document> aThis =
myDoc->Close();
}
- if (this == aPM->moduleDocument().get())
- std::static_pointer_cast<Model_Session>(Model_Session::get())->setCheckTransactions(true);
+ std::static_pointer_cast<Model_Session>(Model_Session::get())->setCheckTransactions(true);
}
void Model_Document::startOperation()
return ARC;
}
} else {
- const std::string aType = anAttrRef->attr()->attributeType();
- if (aType == GeomDataAPI_Point2D::type())
- return POINT2D;
- if (aType == GeomDataAPI_Point2D::type())
- return POINT2D;
+ if (anAttrRef->attr().get() != NULL) {
+ const std::string aType = anAttrRef->attr()->attributeType();
+ if (aType == GeomDataAPI_Point2D::type())
+ return POINT2D;
+ if (aType == GeomDataAPI_Point2D::type())
+ return POINT2D;
+ }
}
return UNKNOWN;