From 6751928e9c2706a931a88f55017450cbf89bde36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Bj=C3=B8rlykke?= Date: Thu, 1 Jun 2017 09:20:38 +0200 Subject: Qt: Enable unhiding all interfaces. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall --- ui/qt/interface_tree_cache_model.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ui') 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 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(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 ) -- cgit v1.2.1