From 96c52c1a0f7585fc0130ce26f66c340589965ff9 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Sun, 9 Dec 2018 09:27:31 -0500 Subject: [PATCH] Multicast Statistics Dialog: Clear list when redrawing The multicast statistics tap provides a continually updating list which the draw function just has to iterate through. Bug: 15271 Change-Id: I270e7ca9460ec9568756b6c8d98f4f17653c8cad Reviewed-on: https://code.wireshark.org/review/30976 Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- ui/qt/multicast_statistics_dialog.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/qt/multicast_statistics_dialog.cpp b/ui/qt/multicast_statistics_dialog.cpp index 920eedf88a..3c58740b54 100644 --- a/ui/qt/multicast_statistics_dialog.cpp +++ b/ui/qt/multicast_statistics_dialog.cpp @@ -276,6 +276,9 @@ void MulticastStatisticsDialog::tapDraw(mcaststream_tapinfo_t *tapinfo) MulticastStatisticsDialog *ms_dlg = dynamic_cast((MulticastStatisticsDialog*)tapinfo->user_data); if (!ms_dlg || !ms_dlg->statsTreeWidget()) return; + //Clear the tree because the list always starts from the beginning + ms_dlg->statsTreeWidget()->clear(); + // Add missing rows and update stats int cur_row = 0; for (GList *cur = g_list_first(tapinfo->strinfo_list); cur; cur = g_list_next(cur)) {