diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | src/graph/layout.c | 2 | ||||
-rw-r--r-- | src/gtkext/gtkgraphview.c | 17 |
3 files changed, 25 insertions, 2 deletions
@@ -1,5 +1,13 @@ 09-07-03 Cyrille Bagard <nocbos@gmail.com> + * src/graph/layout.c: + Be sure the link lines are drawn. + + * src/gtkext/gtkgraphview.c: + Reset the link lines. + +09-07-03 Cyrille Bagard <nocbos@gmail.com> + * src/analysis/binary.c: * src/analysis/binary.h: * src/analysis/line.c: diff --git a/src/graph/layout.c b/src/graph/layout.c index 93d6b28..725d76c 100644 --- a/src/graph/layout.c +++ b/src/graph/layout.c @@ -97,6 +97,8 @@ bool build_graph_view(GtkGraphView *view, GtkBinView **views, size_t count) links = create_links_from_graph_layout(layout, &links_count); gtk_graph_view_attach_links(view, links, links_count); + gtk_widget_queue_draw(GTK_WIDGET(view)); + delete_graph_layout(layout); /* TODO : free nodes */ diff --git a/src/gtkext/gtkgraphview.c b/src/gtkext/gtkgraphview.c index 14cd5b2..0db03f0 100644 --- a/src/gtkext/gtkgraphview.c +++ b/src/gtkext/gtkgraphview.c @@ -200,6 +200,21 @@ static void gtk_graph_view_reset(GtkGraphView *view) { size_t i; /* Boucle de parcours */ + view->start = 0; + view->end = 0; + + for (i = 0; i < view->links_count; i++) + gtk_object_destroy(view->links[i]); + + if (view->links_count > 0) + { + free(view->links); + view->links = NULL; + + view->links_count = 0; + + } + for (i = 0; i < view->childs_count; i++) gtk_widget_destroy(view->childs[i]); @@ -468,8 +483,6 @@ static GtkBinView **gtk_graph_view_load_nodes(openida_binary *binary, GRendering void gtk_graph_view_attach_links(GtkGraphView *view, GtkLinkRenderer **links, size_t count) { - /* TODO : free ? */ - view->links = links; view->links_count = count; |