2008/8/22 Jerome Laheurte <[EMAIL PROTECTED]>:
> I didn't plan on doing anything today anyway :) But I'll have plenty
> of time this week-end, seeing how bad the weather is here in Paris,
> and my friends being on holiday. Just tell me when you're finished and
> I'll start hacking.
I added a __getcopystate__ method that is used for copying instead of
__getstate__. Here's the commit message:
Don't use __getstate__ for getting the contents of a domain object that is
about to be copied, but rather use the new method __getcopystate__. The
difference between the two is that __getstate__ returns a shallow copy of
the state of an object, whereas __getcopystate__ returns a deep copy of
the state. For example, the state returned by __getcopystate__ will
include a copy of the children in case of a composite object, it will include
a copy of attachments and for tasks it will include a copy of effort
records. It will not, however, return a copy of the categories that an
object ('categorizable') belongs to, since categories don't have to be
copied when copying a categorizable.
I focused on getting the copying right, but didn't look into the
undo/redo stuff. I'll leave that to you :-)
cheers, Frank