I committed something I didn't mean to, in setCurrentParent():

On 11/6/10 9:56 AM, Paul McNett wrote:
> @@ -1475,6 +1475,7 @@
>               """ Lets dependent child bizobjs update to the current parent
>               record.
>               """
> +             _oldKey = self.__currentCursorKey
>               if self.LinkField:
>                       if val is None:
>                               val = self.getParentLinkValue()
> @@ -1482,9 +1483,10 @@
>                       self.__currentCursorKey = val
>                       # Make sure there is a cursor object for this key.
>                       self._CurrentCursor = val
> -                     # Propagate the change to any children:
> -                     for child in self.__children:
> -                             child.setCurrentParent()
> +                     if _oldKey != val:
> +                             # Propagate the change to any children:
> +                             for child in self.__children:
> +                                     child.setCurrentParent()

The thought was, if the current key didn't change, don't recurse into the 
children 
since we should expect them to all be on the correct key as well. Probably 
isn't much 
of an optimization in the end since this code should execute quickly, but on 
the 
other hand we may as well leave it in for now if it doesn't cause problems.

Paul

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to