From 9f0a7b470a7b1484774ee73239f7ebc4d6e08a55 Mon Sep 17 00:00:00 2001 From: yangxx Date: Mon, 2 Feb 2004 18:32:29 +0000 Subject: [PATCH] git-svn-id: http://ltt.polymtl.ca/svn@472 04897980-b3bd-0310-b5e0-8ef037075253 --- .../lttv/modules/gui/main/src/callbacks.c | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 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 f7eaa26b..cc6ec38b 100644 --- a/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c +++ b/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c @@ -498,19 +498,21 @@ void remove_trace(GtkWidget * widget, gpointer user_data) if(strcmp(remove_trace_name,name[i]) == 0){ //unselect the trace from the current viewer w = gtk_multi_vpaned_get_widget(mw_data->current_tab->multi_vpaned); - s = g_object_get_data(G_OBJECT(w), "Traceset_Selector"); - t = lttv_traceset_selector_trace_get(s,i); - lttv_trace_selector_set_selected(t, FALSE); - - //check if other viewers select the trace - w = gtk_multi_vpaned_get_first_widget(mw_data->current_tab->multi_vpaned); - while(w){ + if(w){ s = g_object_get_data(G_OBJECT(w), "Traceset_Selector"); t = lttv_traceset_selector_trace_get(s,i); - selected = lttv_trace_selector_get_selected(t); - if(selected)break; - w = gtk_multi_vpaned_get_next_widget(mw_data->current_tab->multi_vpaned); - } + lttv_trace_selector_set_selected(t, FALSE); + + //check if other viewers select the trace + w = gtk_multi_vpaned_get_first_widget(mw_data->current_tab->multi_vpaned); + while(w){ + s = g_object_get_data(G_OBJECT(w), "Traceset_Selector"); + t = lttv_traceset_selector_trace_get(s,i); + selected = lttv_trace_selector_get_selected(t); + if(selected)break; + w = gtk_multi_vpaned_get_next_widget(mw_data->current_tab->multi_vpaned); + } + }else selected = FALSE; //if no viewer selects the trace, remove it if(!selected){ -- 2.34.1