URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=2d12ec67a37d27c4d924a628c7e657762cda8bd4
Submitter: "Roland Knall <rknall@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark
Commits:
2d12ec6 by Peter Wu (peter@xxxxxxxxxxxxx):
Qt: fix erratic expansion of tree item when switching packets
ProtoTree::setRootNode() is designed to update the model with the new
packet tree, and additionally expand tree items in its view. When the
current selected packet is changed, it must use this method to ensure
that collapsed trees are properly expanded. Fix this regression.
It was not entirely clear that framesSelected can no longer use previous
state, so document it explicitly. Remove the call to QTreeView::reset(),
it ends up calling QAbstractItemView::reset() which touches the
selection model that refers invalidated proto_node memory. The reset
function of the view is automatically called the model is reset, so the
call was not needed anyway.
Test: open test/captures/tls13-rfc8446.pcap, expand TLS, TLS Record, and
select "Content Type". Change from frame 1 to 2, and then 3. Observe
that the expanded state remains constant with no flickering. In frame 3,
observe that the tree remains expanded even if no item is selected.
Change-Id: I0c820711f1a62aa51ac100f8ac5c89265c51eb18
Fixes: v3.3.0rc0-6-gcfee0f8082 ("Qt: Remove frameSelect signal")
Reviewed-on: https://code.wireshark.org/review/35230
Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@xxxxxxxxx>
Actions performed:
from 4370164 BGP: Add D-PATH Attribute
add 2d12ec6 Qt: fix erratic expansion of tree item when switching packets
Summary of changes:
ui/qt/packet_list.cpp | 2 ++
ui/qt/proto_tree.cpp | 24 +++++++++++++-----------
2 files changed, 15 insertions(+), 11 deletions(-)