We can't trust "cf->current_frame" to refer to the frame that was
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 15 May 2000 01:50:16 +0000 (01:50 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 15 May 2000 01:50:16 +0000 (01:50 +0000)
commita19ca4801a3d1f101d98ecbd232f7b22a9c7d9b6
treed5e58982bb1965ee02af79de05d53c8f869c5edc
parentaacc3d96d8c008a4e7f55ab6e69810076088e58f
We can't trust "cf->current_frame" to refer to the frame that was
selected before we started re-colorizing or re-filtering the display, as
when the first row is added to the clist, that may be selected and thus
made the current frame.

This means that we can't find the row corresponding to the
previously-selected frame, if any, by checking as each packet is
colorized/filtered and see whether its "frame_data" structure is equal
to "cf->current_frame", as that'll always say that the first frame in
the display is the selected frame.

Instead, we recored the value of "cf->current_frame" before we do
anything to the clist, have "add_packet_to_packet_list()" return either
the row number of the frame (if it passed the filter and thus was added
to the clist) or -1 (if it didn't pass the filter and thus wasn't added
to the clist), and, after "add_packet_to_packet_list()", if the current
frame is the one that was the selected row, remember its row number (if
any), and, when we're finished colorizing/filtering the display, make
that row the current row if it's not -1 (-1 means that the selected row
didn't pass the filter).

Also, don't do that until after we've thawed the clist, as the vertical
adjustment for the clist doesn't reflect reality until then, and
attempting to go to a given row won't work right until the vertical
adjustment for the clist reflects reality.

Shove all the code to set the selected and focus rows, and to make said
row visible, into a routine, so the "Find Frame" and "Go To Frame" code
can use it as well.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1959 f5534014-38df-0310-8fa8-9805f1628bb7
file.c
file.h