From 254a8be91aa06f2bf8e14de3389f5326083d2669 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Wed, 5 Oct 2005 13:45:30 +0000 Subject: Fix Bug 41 related to a badly updated connection between tracks or waypoints. The update was dependant on the connection ordrer between items. This bug induced a bad bounding box and thus a failure to correctly detect enter/leaves on the connection. --- generic/Group.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/generic/Group.c b/generic/Group.c index 1f6a183..9346f31 100644 --- a/generic/Group.c +++ b/generic/Group.c @@ -693,9 +693,9 @@ ComputeCoordinates(ZnItem item, ZnBBox *clip_box; PushTransform(item); - /* printf("Group.c\n"); - ZnPrintTransfo(item->wi->current_transfo); - printf("\n");*/ + //printf("Entering Group: %d\n", item->id); + //ZnPrintTransfo(item->wi->current_transfo); + //printf("\n"); force |= ISSET(item->inv_flags, ZN_TRANSFO_FLAG); @@ -738,22 +738,24 @@ ComputeCoordinates(ZnItem item, current_item = current_item->next) { /* * Skip the clip item, it has been already updated. - * Skip as well items with a dependency, they will - * be updated later. + * Do not skip as well items with a dependency, it is + * useful to update them early (connection between tracks + * or wp) they will be updated again later. */ - if ((current_item == group->clip) || - (current_item->connected_item != ZN_NO_ITEM)) { + //printf("Trying to update: %d\n", current_item->id); + if ((current_item == group->clip) /*|| + (current_item->connected_item != ZN_NO_ITEM)*/) { continue; } if (force || ISSET(current_item->inv_flags, ZN_COORDS_FLAG) || ISSET(current_item->inv_flags, ZN_TRANSFO_FLAG)) { if (current_item->class != ZnGroup) { - /*printf("calling cc on item %d\n", current_item->id);*/ + //printf("Updating item %d\n", current_item->id); CallRegularCC(current_item); } else { - /*printf("calling cc on group %d\n", current_item->id);*/ + //printf("Updating group %d\n", current_item->id); current_item->class->ComputeCoordinates(current_item, force); } } @@ -772,7 +774,7 @@ ComputeCoordinates(ZnItem item, ISSET(current_item->inv_flags, ZN_COORDS_FLAG) || ISSET(current_item->inv_flags, ZN_TRANSFO_FLAG) || ISSET(current_item->connected_item->flags, ZN_UPDATE_DEPENDENT_BIT)) { - /*printf("Updating dependent: %d\n", current_item->id);*/ + //printf("Updating dependent: %d\n", current_item->id); CallRegularCC(current_item); } } @@ -805,6 +807,8 @@ ComputeCoordinates(ZnItem item, PopClip(group, False); PopTransform(item); + + //printf("Leaving Group: %d\n", item->id); } -- cgit v1.1