diff options
author | Preben Guldberg <preben@guldberg.org> | 2023-03-09 22:40:35 +0000 |
---|---|---|
committer | John Thacker <johnthacker@gmail.com> | 2023-03-09 22:40:35 +0000 |
commit | b50ed1dc8088ae0a844e5f451c19b8b333569e47 (patch) | |
tree | 90a6a97359b895258f3c2766c28fbf295b07bb5a | |
parent | 3b7f810f36d909724ab42fec851a4a4db46aa793 (diff) |
GUI: Colorize with filter could use an old filter
When right-clicking an item in the packet details and using "Colorize
with Filter", the colour may be applied using the wrong filter.
The code currently only updates the filter used for "Colorize with
Filter" if the packet details are visible and has focus. This is not
the case when you switch from one packet to another (at least by
clicking the other frame in the packet list).
The patch moves the emit of fieldFilterChanged() up to where the
filed_filter is identified. This seems the least intrusive.
-rw-r--r-- | ui/logray/logray_main_window_slots.cpp | 2 | ||||
-rw-r--r-- | ui/qt/wireshark_main_window_slots.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ui/logray/logray_main_window_slots.cpp b/ui/logray/logray_main_window_slots.cpp index 08b426efb6..4af8837157 100644 --- a/ui/logray/logray_main_window_slots.cpp +++ b/ui/logray/logray_main_window_slots.cpp @@ -1266,6 +1266,7 @@ void LograyMainWindow::setMenusForSelectedTreeRow(FieldInformation *finfo) { char *tmp_field = proto_construct_match_selected_string(fi, capture_file_.capFile()->edt); field_filter = tmp_field; wmem_free(NULL, tmp_field); + emit fieldFilterChanged(field_filter); field_id = fi->hfinfo->id; /* if the selected field isn't a protocol, get its parent */ @@ -1320,7 +1321,6 @@ void LograyMainWindow::setMenusForSelectedTreeRow(FieldInformation *finfo) { if (!proto_tree_ || !proto_tree_->hasFocus()) return; emit packetInfoChanged(capture_file_.packetInfo()); - emit fieldFilterChanged(field_filter); // set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/ResolveName", // frame_selected && (gbl_resolv_flags.mac_name || gbl_resolv_flags.network_name || diff --git a/ui/qt/wireshark_main_window_slots.cpp b/ui/qt/wireshark_main_window_slots.cpp index f2c38c719b..534718f5d1 100644 --- a/ui/qt/wireshark_main_window_slots.cpp +++ b/ui/qt/wireshark_main_window_slots.cpp @@ -1374,6 +1374,7 @@ void WiresharkMainWindow::setMenusForSelectedTreeRow(FieldInformation *finfo) { char *tmp_field = proto_construct_match_selected_string(fi, capture_file_.capFile()->edt); field_filter = tmp_field; wmem_free(NULL, tmp_field); + emit fieldFilterChanged(field_filter); field_id = fi->hfinfo->id; /* if the selected field isn't a protocol, get its parent */ @@ -1428,7 +1429,6 @@ void WiresharkMainWindow::setMenusForSelectedTreeRow(FieldInformation *finfo) { if (!proto_tree_ || !proto_tree_->hasFocus()) return; emit packetInfoChanged(capture_file_.packetInfo()); - emit fieldFilterChanged(field_filter); // set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/ResolveName", // frame_selected && (gbl_resolv_flags.mac_name || gbl_resolv_flags.network_name || |