Reset selected_line while switching to process_details view and back
[lttngtop.git] / src / cursesdisplay.c
index 939920998a61b6396aee8de7c521fe20cf166b88..7f52c8b0e88bbc949b28bff376e2283dcca903d5 100644 (file)
@@ -244,7 +244,7 @@ void update_selected_processes()
        if (process_selected(selected_process)) {
                remove_filter_tid_list(selected_process->tid);
        } else {
-               add_filter_tid_list(selected_process->tid, selected_process);
+               add_filter_tid_list(selected_process);
        }
 }
 
@@ -1346,6 +1346,7 @@ void update_hostname_pref(int *line_selected, int toggle_filter, int toggle_sort
                host = g_hash_table_lookup(global_host_list, hostlist->data);
                if (i == *line_selected && toggle_filter == 1) {
                        host->filter = host->filter == 1 ? 0:1;
+                       update_hostname_filter(host);
                        update_current_view();
                }
                if (i == *line_selected) {
@@ -1628,6 +1629,7 @@ void *handle_keyboard(void *p)
                                current_view = previous_view;
                                previous_view = process_details;
                        }
+                       selected_line = 0;
                        update_current_view();
                        break;
 
This page took 0.022988 seconds and 4 git commands to generate.