From 4307d131957b68bc87d4fbf354dfaa5c68c17954 Mon Sep 17 00:00:00 2001 From: John Thacker Date: Fri, 13 Jan 2023 18:04:37 -0500 Subject: [PATCH] Qt: Fix selection of filter column in Conversation table When converting from our columns as displayed to the canonical list of columns, add 1 for the missing conversation ID if it is not present (as opposed to if it is present.) Also change the test for the total packets to account for the new conversation ID column. Related to #18738 --- ui/qt/widgets/traffic_tree.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/qt/widgets/traffic_tree.cpp b/ui/qt/widgets/traffic_tree.cpp index 18281e853d..3b1f018bf5 100644 --- a/ui/qt/widgets/traffic_tree.cpp +++ b/ui/qt/widgets/traffic_tree.cpp @@ -299,10 +299,11 @@ int TrafficDataFilterProxy::mapToSourceColumn(int proxyColumn) const column++; } ConversationDataModel * convModel = qobject_cast(model); - if (convModel->showConversationId() && column > ConversationDataModel::CONV_COLUMN_BYTES) + if (!convModel->showConversationId() && column > ConversationDataModel::CONV_COLUMN_BYTES) { column++; + } if (! model->showTotalColumn()) { - if (column > ConversationDataModel::CONV_COLUMN_BYTES) + if (column > ConversationDataModel::CONV_COLUMN_CONV_ID) column+=2; } }