aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/packet_list.cpp
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2015-09-18 18:48:09 +0200
committerGerald Combs <gerald@wireshark.org>2015-09-18 17:46:16 +0000
commitcdc1b1ef8e74fb9b7ae02a33c4932e2cdcda5f9c (patch)
treefa4d8c15c903bddb96b70885dd3c81bd123ca0e8 /ui/qt/packet_list.cpp
parentbb7f7d32688abcbc05e954bf380d5759a0b9bf47 (diff)
Qt: flush visible rows before trying to select one
Otherwise you end up with a 'End of capture exceeded' popup when calling rescan_packets() with only a few packets in the capture Change-Id: Idb387ce95f1d22b934e735c350ea0c117763d89a Reviewed-on: https://code.wireshark.org/review/10567 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/packet_list.cpp')
-rw-r--r--ui/qt/packet_list.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp
index cabdbbbf81..d74b38d7ad 100644
--- a/ui/qt/packet_list.cpp
+++ b/ui/qt/packet_list.cpp
@@ -136,6 +136,7 @@ packet_list_select_last_row(void)
gboolean
packet_list_select_row_from_data(frame_data *fdata_needle)
{
+ gbl_cur_packet_list->packetListModel()->flushVisibleRows();
int row = gbl_cur_packet_list->packetListModel()->visibleIndexOf(fdata_needle);
if (row >= 0) {
gbl_cur_packet_list->setCurrentIndex(gbl_cur_packet_list->packetListModel()->index(row,0));