diff options
author | John Thacker <johnthacker@gmail.com> | 2023-01-13 18:04:37 -0500 |
---|---|---|
committer | John Thacker <johnthacker@gmail.com> | 2023-01-13 18:07:07 -0500 |
commit | 4307d131957b68bc87d4fbf354dfaa5c68c17954 (patch) | |
tree | b51b989ddcfdd1d58fa6366e5565c6c4816a1af4 /ui | |
parent | d09460283b0e8a9312159ead9d4271a2a8124f65 (diff) |
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
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/widgets/traffic_tree.cpp | 5 |
1 files 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<ConversationDataModel *>(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; } } |