aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2019-01-30 10:31:02 +0100
committerStig Bjørlykke <stig@bjorlykke.org>2019-01-31 10:15:56 +0000
commit66c548fdb76d649ecda25da6a1b4e344b8964a64 (patch)
treeacd56247328e8de46c03a863efb5ee653c6d4f81
parentb5817dbda7de860e8e89cca5d1217d948c065259 (diff)
Qt: Restore column width and visibility when switching profiles
In some cases the column width and/or hidden setting is not correctly applied when switching between profiles having different hidden settings. Unhiding the column before applying width and hidden setting fixes this issue. Bug: 15466 Change-Id: I09e3451612ba6dd0510b19f7f4d84d281b0188b5 Reviewed-on: https://code.wireshark.org/review/31812 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
-rw-r--r--ui/qt/packet_list.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp
index 79f1c628d3..53d334ba47 100644
--- a/ui/qt/packet_list.cpp
+++ b/ui/qt/packet_list.cpp
@@ -857,6 +857,9 @@ void PacketList::applyRecentColumnWidths()
int column_width = 0;
for (int col = 0; col < prefs.num_cols; col++) {
+ // The column must be shown before setting column width.
+ // Visibility will be updated in setColumnVisibility().
+ setColumnHidden(col, false);
setRecentColumnWidth(col);
column_width += columnWidth(col);
}