diff options
Diffstat (limited to 'src/gtkext/graph/nodes')
| -rw-r--r-- | src/gtkext/graph/nodes/flow.c | 4 | ||||
| -rw-r--r-- | src/gtkext/graph/nodes/virtual.c | 16 | 
2 files changed, 14 insertions, 6 deletions
diff --git a/src/gtkext/graph/nodes/flow.c b/src/gtkext/graph/nodes/flow.c index fad520d..6bb2617 100644 --- a/src/gtkext/graph/nodes/flow.c +++ b/src/gtkext/graph/nodes/flow.c @@ -581,6 +581,10 @@ void g_flow_node_link(GFlowNode *node, GGraphLayout *layout, GGraphNode *nodes)  void g_flow_node_place(const GFlowNode *node, GtkGraphView *view)  { +    printf("[put] %p (%d ; %d) - (%d ; %d)\n", node, +           G_GRAPH_NODE(node)->alloc.x, G_GRAPH_NODE(node)->alloc.y, +           G_GRAPH_NODE(node)->alloc.width, G_GRAPH_NODE(node)->alloc.height); +      gtk_graph_view_put(view, GTK_WIDGET(node->view), &G_GRAPH_NODE(node)->alloc);  } diff --git a/src/gtkext/graph/nodes/virtual.c b/src/gtkext/graph/nodes/virtual.c index 48cc1fb..de0e75e 100644 --- a/src/gtkext/graph/nodes/virtual.c +++ b/src/gtkext/graph/nodes/virtual.c @@ -473,7 +473,7 @@ static void g_virtual_node_apply_position(GVirtualNode *node)  {      gint min;                               /* Valeur minimale rencontrée  */      size_t i;                               /* Boucle de parcours          */ -    gint pos_x;                             /* Nouvelle position #1        */ +    gint x_pos;                             /* Nouvelle position #1        */      gint offset;                            /* Décallage à faire suivre    */      g_virtual_node_apply_x_line(node); @@ -484,8 +484,8 @@ static void g_virtual_node_apply_position(GVirtualNode *node)      for (i = 0; i < node->count; i++)      { -        g_graph_node_get_position(node->children[i], &pos_x, NULL); -        min = MIN(min, pos_x); +        g_graph_node_get_position(node->children[i], &x_pos, NULL); +        min = MIN(min, x_pos);      }      /* Espace pour les liens remontants */ @@ -503,10 +503,14 @@ static void g_virtual_node_apply_position(GVirtualNode *node)      {          /* BUG_ON(node->children[i]->alloc.x != UNINITIALIZED_NODE_POS); */ -        g_graph_node_get_position(node->children[i], &pos_x, NULL); -        pos_x += offset; +        g_graph_node_get_position(node->children[i], &x_pos, NULL); + +        printf(" == vapply ==  %p : %d + %d -> %d\n", +               node->children[i], x_pos, offset, (int)(x_pos + offset)); -        g_graph_node_set_x_position(node->children[i], pos_x); +        x_pos += offset; + +        g_graph_node_set_x_position(node->children[i], x_pos);      }  | 
