aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/proto_tree.cpp
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2018-05-08 10:50:00 +0200
committerStig Bjørlykke <stig@bjorlykke.org>2018-05-09 06:20:58 +0000
commit612fb778f51b704745559345485f4ea44aa71aef (patch)
tree9aae1246c3c3d6165def4e8c4386981063dcec21 /ui/qt/proto_tree.cpp
parent4513c66b1a2c7f7feb729e7e4e576b390395a123 (diff)
Qt: Update frame selected in several cases
Ensure that frameSelected(0) is emitted when not having a proto tree field selected because of: 1. No match when trying to restore selected field 2. Search selects a packet with no field to select 3. Current packet is deselected This will disable functionality which requires a selected field and updates the status bar according to selected field. Bug: 14658 Change-Id: I158fae4f26c02f718cee0030ef9e38b597876381 Reviewed-on: https://code.wireshark.org/review/27395 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'ui/qt/proto_tree.cpp')
-rw-r--r--ui/qt/proto_tree.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/qt/proto_tree.cpp b/ui/qt/proto_tree.cpp
index 26ffa2d38a..8b53332039 100644
--- a/ui/qt/proto_tree.cpp
+++ b/ui/qt/proto_tree.cpp
@@ -478,7 +478,9 @@ void ProtoTree::restoreSelectedField()
cur_index = proto_tree_model_->index(row, 0, cur_index);
FieldInformation finfo(proto_tree_model_->protoNodeFromIndex(cur_index).protoNode());
if (!finfo.isValid() || finfo.headerInfo().id != hf_id) {
+ // Did not find the selected hfid path in the selected packet
cur_index = QModelIndex();
+ emit fieldSelected(0);
break;
}
}