diff options
author | Anders Broman <anders.broman@ericsson.com> | 2010-02-01 06:27:24 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2010-02-01 06:27:24 +0000 |
commit | cb1f3e6986c5085fd52e1080655e21d117cd5a45 (patch) | |
tree | f44f66d48c65c554905f4ece3415e6b4f983f601 /gtk/new_packet_list.c | |
parent | 7789513924ab8044c09b836d4126492c355a7ebc (diff) | |
download | wireshark-cb1f3e6986c5085fd52e1080655e21d117cd5a45.tar.gz |
- Back out the change to restore the selection after freeze/thaw.
- Move packets_bar_update(); to new_packet_list_append() as
we may not freeze/thaw the list.
svn path=/trunk/; revision=31747
Diffstat (limited to 'gtk/new_packet_list.c')
-rw-r--r-- | gtk/new_packet_list.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/gtk/new_packet_list.c b/gtk/new_packet_list.c index 9a7d37e699..11fabf5079 100644 --- a/gtk/new_packet_list.c +++ b/gtk/new_packet_list.c @@ -133,9 +133,11 @@ new_packet_list_append(column_info *cinfo _U_, frame_data *fdata, packet_info *p /* fdata should be filled with the stuff we need * strings are built at display time. */ - + guint visible_pos = packet_list_append_record(packetlist, fdata); + packets_bar_update(); /* Return the _visible_ position */ - return packet_list_append_record(packetlist, fdata); + + return visible_pos; } static gboolean @@ -586,9 +588,6 @@ new_packet_list_freeze(void) void new_packet_list_thaw(void) { - GtkTreePath *path; - GtkTreeSelection *selection; - GtkTreeIter iter; /* Apply model */ gtk_tree_view_set_model( GTK_TREE_VIEW(packetlist->view), GTK_TREE_MODEL(packetlist)); @@ -596,18 +595,6 @@ new_packet_list_thaw(void) /* Remove extra reference added by new_packet_list_freeze() */ g_object_unref(packetlist); - /* Selection may have been lost, reselect the current row */ - if (cfile.current_row!=0){ - path = gtk_tree_path_new_from_indices(cfile.current_row-1, -1); - - if (gtk_tree_model_get_iter(gtk_tree_view_get_model(GTK_TREE_VIEW(packetlist->view)), &iter, path)){ - /* Select the row */ - selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(packetlist->view)); - gtk_tree_selection_select_iter (selection, &iter); - } - } - - packets_bar_update(); } void |