summaryrefslogtreecommitdiff
path: root/src/gtkext/graph/nodes
diff options
context:
space:
mode:
Diffstat (limited to 'src/gtkext/graph/nodes')
-rw-r--r--src/gtkext/graph/nodes/flow.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gtkext/graph/nodes/flow.c b/src/gtkext/graph/nodes/flow.c
index 2f822bd..343f916 100644
--- a/src/gtkext/graph/nodes/flow.c
+++ b/src/gtkext/graph/nodes/flow.c
@@ -385,7 +385,17 @@ static void g_flow_node_prepare_x_line(GFlowNode *node, GGraphNode *nodes)
pos.left_node = G_GRAPH_NODE(target_a);
pos.right_node = G_GRAPH_NODE(target_b);
- g_graph_node_set_pending_position(base, PPF_MIDDLE_OF, pos);
+ /**
+ * Un pré-condition pour pouvoir s'aligner est que les noeuds
+ * de références soient traités au préalables pour les positions.
+ * Sinon les assert() coincent dans g_virtual_node_apply_x_line().
+ */
+
+ if (g_graph_node_find_container_at_same_level(nodes, base, pos.left_node) != NULL
+ && g_graph_node_find_container_at_same_level(nodes, base, pos.right_node) != NULL)
+ {
+ g_graph_node_set_pending_position(base, PPF_MIDDLE_OF, pos);
+ }
break;