Allow a model history parent to be set.#475
Conversation
Also, set the parent correctly when adding one to an existing element.
fbergmann
left a comment
There was a problem hiding this comment.
@luciansmith great catch! I agree that the SBase change, definitely should go in.
the new 'connectToParent' method, i'm not so sure about. We have the function to set the parent object. And ModelHistory is not an SBase derived class (or an SBML object), so I would find the method there confusing. Would you be fine with just the sbase change getting in?
|
The other method is private, so I can't call it from Antimony. Originally I just made it public, but looking at other classes, 'connectToParent' was the function we usually used. I would be fine with either the current change, or the other parent-related functions being made public instead of protected! |
|
@luciansmith lets make the isSet/get/set/unset ParentObject methods public! That would be even better than the connectToParent |
Also, set the parent correctly when adding one to an existing element.
Found a bug in Antimony where I would copy a ModelHistory object from one document to another, and it came with its old parent, which would often be deleted. However, there was no way for me to unset the parent of a ModelHistory, so this fixes that.