if (theObject.get() != NULL) {
aData = std::dynamic_pointer_cast<Model_Data>(theObject->data());
myRef->Remove(aData->label().Father());
+ REMOVE_BACK_REF(theObject);
}
else { // in case of empty object remove, the first empty object is removed from the list
std::shared_ptr<Model_Document> aDoc = std::dynamic_pointer_cast<Model_Document>(
return myRef->Extent();
}
+bool Model_AttributeRefList::isInitialized()
+{
+ if (size() == 0) { // empty list is not initialized list: sketch will be not valid after add/undo
+ return false;
+ }
+ return ModelAPI_AttributeRefList::isInitialized();
+}
+
list<ObjectPtr> Model_AttributeRefList::list()
{
std::list<ObjectPtr> aResult;