aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/proto_tree.cpp
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2019-11-27 02:11:53 +0000
committerRoland Knall <rknall@gmail.com>2019-11-27 06:35:13 +0000
commit07a1753d447bf46d8f197c837983602258191529 (patch)
tree83db850e515b06a95c6d1d24485085f83e989837 /ui/qt/proto_tree.cpp
parent15faccd2e4077b3449a9b487cc008cb74e991d37 (diff)
Qt: focus the correct field when switching packets
Instead of just visually marking a field after switching packets, make sure that it is also focused such that arrow up/down keys select the expected fields instead of the root node (the Frame layer). Change-Id: Ic16462198fb2189496f0cceeb5a5e885673636d2 Reviewed-on: https://code.wireshark.org/review/35236 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'ui/qt/proto_tree.cpp')
-rw-r--r--ui/qt/proto_tree.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/qt/proto_tree.cpp b/ui/qt/proto_tree.cpp
index 4d8f4acc9e..eb9858fefc 100644
--- a/ui/qt/proto_tree.cpp
+++ b/ui/qt/proto_tree.cpp
@@ -456,7 +456,7 @@ void ProtoTree::emitRelatedFrame(int related_frame, ft_framenum_type_t framenum_
void ProtoTree::autoScrollTo(const QModelIndex &index)
{
- selectionModel()->select(index, QItemSelectionModel::ClearAndSelect);
+ selectionModel()->setCurrentIndex(index, QItemSelectionModel::ClearAndSelect);
if (!index.isValid()) {
return;
}