From 959fe0e18b1679672a47e7568e76780863fd0eac Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Thu, 31 Mar 2016 00:03:35 +0200 Subject: Qt: Keep byte tab when reloading/closing capture file Do not remove byte view on closing a capture file. For this to work, the tree items must also be remembered. Change-Id: Ice5cd1006b957e2d1331effc15c4c0a9de89916d Reviewed-on: https://code.wireshark.org/review/14715 Petri-Dish: Alexis La Goutte Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte Reviewed-by: Peter Wu --- ui/qt/packet_dialog.cpp | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'ui/qt') diff --git a/ui/qt/packet_dialog.cpp b/ui/qt/packet_dialog.cpp index a8e26f217f..0d19f9a59e 100644 --- a/ui/qt/packet_dialog.cpp +++ b/ui/qt/packet_dialog.cpp @@ -38,8 +38,6 @@ #include // To do: -// - Don't hide the byte view when we reload. -// - Find a way to preserve the byte view after the file closes. // - Copy over experimental packet editing code. // - Fix ElidedText width. @@ -118,16 +116,6 @@ PacketDialog::~PacketDialog() void PacketDialog::captureFileClosing() { - delete byte_view_tab_; - byte_view_tab_ = NULL; - - QTreeWidgetItemIterator iter(proto_tree_); - while (*iter) { - QTreeWidgetItem *item = (*iter); - item->setData(0, Qt::UserRole, QVariant()); - ++iter; - } - QString closed_title = tr("[%1 closed] " UTF8_MIDDLE_DOT " %2") .arg(cap_file_.fileName()) .arg(col_info_); -- cgit v1.2.3