From d56f0e3fb20e2bef965e22ccb916ba715d4e6ff1 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Thu, 18 Feb 2010 15:21:31 -0500 Subject: trace-graph: Fix scrollbar when adding plots When adding plots with the plot menu, the scroll bar did not expand to let the new plots into the visible area. Need to recalculate the height after a plot is added or removed. Signed-off-by: Steven Rostedt --- trace-graph.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trace-graph.c b/trace-graph.c index 48a0e5a..033229e 100644 --- a/trace-graph.c +++ b/trace-graph.c @@ -480,7 +480,6 @@ plot_task_clicked (gpointer data) graph_plot_task(ginfo, ginfo->filter_task_selected, pos); ginfo->draw_height = PLOT_SPACE(ginfo->plots); - ginfo->draw_height = PLOT_SPACE(ginfo->plots); gtk_widget_set_size_request(ginfo->draw, ginfo->draw_width, ginfo->draw_height); update_label_window(ginfo); } @@ -2184,6 +2183,8 @@ static int load_handle(struct graph_info *ginfo, void trace_graph_refresh(struct graph_info *ginfo) { + ginfo->draw_height = PLOT_SPACE(ginfo->plots); + gtk_widget_set_size_request(ginfo->draw, ginfo->draw_width, ginfo->draw_height); update_label_window(ginfo); redraw_graph(ginfo); } -- cgit v1.2.2