From 21e8c385eea6d358ce5c7254eb4e8fbdd5393425 Mon Sep 17 00:00:00 2001 From: yangxx Date: Tue, 3 Feb 2004 21:35:00 +0000 Subject: [PATCH] git-svn-id: http://ltt.polymtl.ca/svn@475 04897980-b3bd-0310-b5e0-8ef037075253 --- .../poly/lttv/modules/gui/main/src/callbacks.c | 12 ++++++++++++ .../poly/lttv/modules/gui/statistics/statistics.c | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c b/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c index 084d56e5..75a9b0a8 100644 --- a/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c +++ b/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c @@ -446,6 +446,18 @@ void add_trace(GtkWidget * widget, gpointer user_data) //update current tab update_traceset(mw_data); + + get_traceset_time_span(mw_data,LTTV_TRACESET_CONTEXT(mw_data->current_tab->traceset_info->traceset_context)->Time_Span); + if(lttv_traceset_number(mw_data->current_tab->traceset_info->traceset) == 1 || + ltt_time_compare(mw_data->current_tab->current_time, + LTTV_TRACESET_CONTEXT(mw_data->current_tab->traceset_info->traceset_context)->Time_Span->startTime)<0){ + mw_data->current_tab->current_time = + LTTV_TRACESET_CONTEXT(mw_data->current_tab->traceset_info->traceset_context)->Time_Span->startTime; + mw_data->current_tab->time_window.start_time = mw_data->current_tab->current_time; + mw_data->current_tab->time_window.time_width.tv_sec = DEFAULT_TIME_WIDTH_S; + mw_data->current_tab->time_window.time_width.tv_nsec = 0; + } + redraw_viewer(mw_data, &(mw_data->current_tab->time_window)); set_current_time(mw_data,&(mw_data->current_tab->current_time)); break; diff --git a/ltt/branches/poly/lttv/modules/gui/statistics/statistics.c b/ltt/branches/poly/lttv/modules/gui/statistics/statistics.c index fefaa307..02c517d2 100644 --- a/ltt/branches/poly/lttv/modules/gui/statistics/statistics.c +++ b/ltt/branches/poly/lttv/modules/gui/statistics/statistics.c @@ -595,8 +595,8 @@ gboolean statistic_traceset_changed(void * hook_data, void * call_data) { StatisticViewerData *statistic_viewer_data = (StatisticViewerData*) hook_data; - // gtk_tree_store_clear (statistic_viewer_data->store_m); - // statistic_viewer_data->shown = FALSE; + gtk_tree_store_clear (statistic_viewer_data->store_m); + statistic_viewer_data->shown = FALSE; return FALSE; } -- 2.34.1