aboutsummaryrefslogtreecommitdiff
path: root/generic
diff options
context:
space:
mode:
authorlecoanet2005-10-05 13:45:30 +0000
committerlecoanet2005-10-05 13:45:30 +0000
commit254a8be91aa06f2bf8e14de3389f5326083d2669 (patch)
tree21a4e2bea575bb7fcb31482e2dcd38c203e2fd27 /generic
parent18a7dc0bc8242a556e4eea57b70bf92616a8948a (diff)
downloadtkzinc-254a8be91aa06f2bf8e14de3389f5326083d2669.zip
tkzinc-254a8be91aa06f2bf8e14de3389f5326083d2669.tar.gz
tkzinc-254a8be91aa06f2bf8e14de3389f5326083d2669.tar.bz2
tkzinc-254a8be91aa06f2bf8e14de3389f5326083d2669.tar.xz
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.
Diffstat (limited to 'generic')
-rw-r--r--generic/Group.c24
1 files 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);
}