Fix for bug #1140: Filtering messes up packet list sort order

svn path=/trunk/; revision=20394
This commit is contained in:
Stephen Fisher 2007-01-11 19:50:19 +00:00
parent efa6338231
commit cbe42b8a24
3 changed files with 17 additions and 0 deletions

3
file.c
View File

@ -1551,6 +1551,9 @@ rescan_packets(capture_file *cf, const char *action, const char *action_item,
prev_frame = fdata;
}
/* Re-sort the list using the previously selected order */
packet_list_set_sort_column();
if (redissect) {
/* Clear out what remains of the visited flags and per-frame data
pointers.

View File

@ -893,3 +893,16 @@ packet_list_get_sort_column(void)
{
return ETH_CLIST(packet_list)->sort_column;
}
/* Re-sort the clist by the previously selected sort */
void
packet_list_set_sort_column(void)
{
packet_list_freeze();
eth_clist_set_sort_column(ETH_CLIST(packet_list), packet_list_get_sort_column());
eth_clist_sort(ETH_CLIST(packet_list));
packet_list_thaw();
}

View File

@ -65,6 +65,7 @@ void packet_list_set_cls_time_width(gint);
gpointer packet_list_get_row_data(gint);
void packet_list_set_selected_row(gint);
gint packet_list_get_sort_column(void);
void packet_list_set_sort_column(void);
#ifdef __cplusplus