X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Fgui%2Flttvwindow%2Flttvwindow%2Fcallbacks.c;h=1a5fed3707cbea3fff1b25a7ef65ecdc5f3afb9b;hb=dc5e526626e33c0cc08b74c6a78dc8192e2bce36;hp=25586e6cd7fa6ee35ab279c81b8dca35ab820bb3;hpb=0e8fbe23bcada91edead9534dcb42bdef681bc91;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c index 25586e6c..1a5fed37 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c @@ -4500,7 +4500,8 @@ void tab_destructor(Tab * tab) ltt_trace_close(lttv_trace(trace)); } } - } + } + lttv_filter_destroy(tab->filter); lttv_traceset_destroy(tab->traceset_info->traceset); /* Remove the idle events requests processing function of the tab */ g_idle_remove_by_data(tab); @@ -4529,8 +4530,15 @@ Tab* create_tab(MainWindow * mw, Tab *copy_tab, if(copy_tab) { tab->traceset_info->traceset = lttv_traceset_copy(copy_tab->traceset_info->traceset); + + /* Copy the previous tab's filter */ + /* We can clone the filter, as we copy the trace set also */ + /* The filter must always be in sync with the trace set */ + tab->filter = lttv_filter_clone(copy_tab->filter); + } else { tab->traceset_info->traceset = lttv_traceset_new(); + tab->filter = NULL; } #ifdef DEBUG