aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-02-18 15:21:31 -0500
committerSteven Rostedt <rostedt@goodmis.org>2010-02-18 15:21:31 -0500
commitd56f0e3fb20e2bef965e22ccb916ba715d4e6ff1 (patch)
treeeddf0d62258c3aba0c2ef1d3d41282b3e76dd861
parent98f871f2d720fadbd2ad5888362342f26dba9b27 (diff)
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 <rostedt@goodmis.org>
-rw-r--r--trace-graph.c3
1 files changed, 2 insertions, 1 deletions
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)
480 480
481 graph_plot_task(ginfo, ginfo->filter_task_selected, pos); 481 graph_plot_task(ginfo, ginfo->filter_task_selected, pos);
482 ginfo->draw_height = PLOT_SPACE(ginfo->plots); 482 ginfo->draw_height = PLOT_SPACE(ginfo->plots);
483 ginfo->draw_height = PLOT_SPACE(ginfo->plots);
484 gtk_widget_set_size_request(ginfo->draw, ginfo->draw_width, ginfo->draw_height); 483 gtk_widget_set_size_request(ginfo->draw, ginfo->draw_width, ginfo->draw_height);
485 update_label_window(ginfo); 484 update_label_window(ginfo);
486} 485}
@@ -2184,6 +2183,8 @@ static int load_handle(struct graph_info *ginfo,
2184 2183
2185void trace_graph_refresh(struct graph_info *ginfo) 2184void trace_graph_refresh(struct graph_info *ginfo)
2186{ 2185{
2186 ginfo->draw_height = PLOT_SPACE(ginfo->plots);
2187 gtk_widget_set_size_request(ginfo->draw, ginfo->draw_width, ginfo->draw_height);
2187 update_label_window(ginfo); 2188 update_label_window(ginfo);
2188 redraw_graph(ginfo); 2189 redraw_graph(ginfo);
2189} 2190}