TrafficTree: Fix wrong element choosen in context menu

The context menu falsely assigns the proxied index to the context menu
entries, therefore always selecting the wrong model index for the
resulting functions.

Fixes #18xxx
This commit is contained in:
Roland Knall 2022-10-28 14:51:38 +02:00
parent f8efd93fc7
commit ea60fdcb31
2 changed files with 4 additions and 5 deletions

View File

@ -34,9 +34,6 @@
// To do:
// - https://gitlab.com/wireshark/wireshark/-/issues/6727
// - Wide last column?
// + No arrows on unsorted columns
// - Add follow stream to context menu
// + Change "A <- B" to "B -> A"
// - Improper wildcard handling https://gitlab.com/wireshark/wireshark/-/issues/8010
// - TShark consolidation https://gitlab.com/wireshark/wireshark/-/issues/6310
// - Display filter entry?
@ -45,8 +42,6 @@
// Bugs:
// - Slow for large numbers of items.
// - Name resolution doesn't do anything if its preference is disabled.
// - Columns don't resize correctly.
// - Closing the capture file clears conversation data.
// Fixed bugs:
// - Friendly unit displays https://gitlab.com/wireshark/wireshark/-/issues/9231

View File

@ -535,6 +535,10 @@ void TrafficTree::customContextMenu(const QPoint &pos)
bool isConv = false;
QModelIndex idx = indexAt(pos);
TrafficDataFilterProxy * proxy = qobject_cast<TrafficDataFilterProxy *>(model());
if (proxy)
idx = proxy->mapToSource(idx);
ConversationDataModel * model = qobject_cast<ConversationDataModel *>(dataModel());
if (model)
isConv = true;