diff options
author | Tomasz Moń <desowin@gmail.com> | 2020-05-07 16:45:14 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2020-05-08 04:07:35 +0000 |
commit | 63a8ac5210f1935c684b74170278b177d2e01561 (patch) | |
tree | 16650c94769c8d4d48b19f0b5c31678dcd91720c /ui | |
parent | fd7895d37c2410f81231efdfd8b0640c15887a70 (diff) |
Qt: Respect user preference to hide packet list
Instead of hiding whole packet list widget when freezing, hide only the
header. This prevents unwanted column resizes while keeping the widget
on screen while capture file is loading.
Prevent flickering by showing master_split_ only after all widgets are
in correct place.
Ping-Bug: 16063
Ping-Bug: 16491
Change-Id: I3bb0763c44b23b1e4118003502d4bf3903591f34
Reviewed-on: https://code.wireshark.org/review/37159
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/main_window_layout.cpp | 8 | ||||
-rw-r--r-- | ui/qt/packet_list.cpp | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/ui/qt/main_window_layout.cpp b/ui/qt/main_window_layout.cpp index 0707a35382..aa0db6d71d 100644 --- a/ui/qt/main_window_layout.cpp +++ b/ui/qt/main_window_layout.cpp @@ -91,10 +91,6 @@ void MainWindow::layoutPanes() empty_pane_.setParent(main_ui_->mainStack); extra_split_.setParent(main_ui_->mainStack); - // Show the master splitter here to prevent pending resize events changing packet list columns - // when the master splitter is set as current widget for the first time. - master_split_.show(); - // XXX We should try to preserve geometries if we can, e.g. by // checking to see if the layout type is the same. switch(prefs.gui_layout_type) { @@ -161,6 +157,10 @@ void MainWindow::layoutPanes() proto_tree_->setVisible(ms_children.contains(proto_tree_) && recent.tree_view_show); byte_view_tab_->setVisible(ms_children.contains(byte_view_tab_) && recent.byte_view_show); + // Show the master splitter here to prevent pending resize events changing packet list columns + // when the master splitter is set as current widget for the first time. + master_split_.show(); + packet_list_->thaw(true); cur_layout_ = new_layout; } diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp index d936925a8f..78dedda7e3 100644 --- a/ui/qt/packet_list.cpp +++ b/ui/qt/packet_list.cpp @@ -1170,7 +1170,7 @@ void PacketList::captureFileReadFinished() void PacketList::freeze() { column_state_ = header()->saveState(); - setVisible(false); + setHeaderHidden(true); if (currentIndex().isValid()) { frozen_row_ = currentIndex().row(); } else { @@ -1188,7 +1188,7 @@ void PacketList::freeze() void PacketList::thaw(bool restore_selection) { - setVisible(true); + setHeaderHidden(false); setModel(packet_list_model_); // Resetting the model resets our column widths so we restore them here. |