diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2013-04-18 12:00:53 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2013-04-18 12:00:53 +0200 |
commit | b598889d850feeef7501d0023991ca87d023b5f6 (patch) | |
tree | 9f4ddc200cf811d81e32ccf485191a82504ca5fd /ufo/ufo-graph.c | |
parent | c68722cba8071e3b7ca67cebd8c04f5596258617 (diff) |
Don't create exact same edge again
Diffstat (limited to 'ufo/ufo-graph.c')
-rw-r--r-- | ufo/ufo-graph.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ufo/ufo-graph.c b/ufo/ufo-graph.c index 9dbbf26..6a8955f 100644 --- a/ufo/ufo-graph.c +++ b/ufo/ufo-graph.c @@ -116,6 +116,11 @@ ufo_graph_connect_nodes (UfoGraph *graph, g_return_if_fail (UFO_IS_GRAPH (graph)); priv = graph->priv; + if (ufo_graph_is_connected (graph, source, target) && + ufo_graph_get_edge_label (graph, source, target) == label) { + return; + } + edge = g_new0 (UfoEdge, 1); edge->source = source; edge->target = target; |