summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2017-06-01 09:20:38 +0200
committerRoland Knall <rknall@gmail.com>2017-06-01 08:57:18 +0000
commit6751928e9c2706a931a88f55017450cbf89bde36 (patch)
tree460a8879e56f245b487c76bf9059d9f0220c6202 /ui
parent6a37b542e4f1c6de7646d7ebe7fdfa2825fa0453 (diff)
downloadwireshark-6751928e9c2706a931a88f55017450cbf89bde36.tar.gz
Qt: Enable unhiding all interfaces.
When having hidden interfaces it was not possible to unhide all in the "Manage Interfaces" dialog because prefs.capture_devices_hide was not updated when not having any hidden interfaces. This bug was introduced in g6eee29bf. Change-Id: If94c2e592eea60e6f1ef1ce2107ff9b2b27c3176 Reviewed-on: https://code.wireshark.org/review/21869 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/interface_tree_cache_model.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/qt/interface_tree_cache_model.cpp b/ui/qt/interface_tree_cache_model.cpp
index 3190ba4fb7..e89e266868 100644
--- a/ui/qt/interface_tree_cache_model.cpp
+++ b/ui/qt/interface_tree_cache_model.cpp
@@ -154,6 +154,8 @@ void InterfaceTreeCacheModel::save()
QMap<char**, QStringList> prefStorage;
+ /* No devices are hidden until checking "Show" state */
+ prefStorage[&prefs.capture_devices_hide] = QStringList();
/* Storing new devices first including their changed values */
saveNewDevices();
@@ -235,7 +237,7 @@ void InterfaceTreeCacheModel::save()
QVariant content = getColumnContent(idx, IFTREE_COL_HIDDEN, Qt::CheckStateRole);
if ( content.isValid() && static_cast<Qt::CheckState>(content.toInt()) == Qt::Unchecked )
- prefStorage[&prefs.capture_devices_hide] << QString(device.name);
+ prefStorage[&prefs.capture_devices_hide] << QString(device.name);
content = getColumnContent(idx, IFTREE_COL_INTERFACE_COMMENT);
if ( content.isValid() && content.toString().size() > 0 )