summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2007-08-30 18:14:56 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2007-08-30 18:14:56 +0000
commit4146da5565a7df64b0f2296974ad0dfd25b7c7da (patch)
tree3014f79ed174b0c6c13519d1305f6ce7f5010e34 /rbutil
parentc14731733a13e9ca0413b06cb1e2d6f8b3ebfaa2 (diff)
downloadrockbox-4146da5565a7df64b0f2296974ad0dfd25b7c7da.tar.gz
rockbox-4146da5565a7df64b0f2296974ad0dfd25b7c7da.zip
When collapsing the devices tree upon detection collapse all.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14535 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/configure.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/rbutil/rbutilqt/configure.cpp b/rbutil/rbutilqt/configure.cpp
index 49fa82f993..53404ba4a2 100644
--- a/rbutil/rbutilqt/configure.cpp
+++ b/rbutil/rbutilqt/configure.cpp
@@ -517,13 +517,12 @@ void Config::autodetect()
if(detector.detect()) //let it detect
{
QString devicename = detector.getDevice();
-
- if(ui.treeDevices->selectedItems().size() > 0) {
- // deexpand the platform
- ui.treeDevices->selectedItems().at(0)->parent()->setExpanded(false);
- //deselect the selected item
- ui.treeDevices->selectedItems().at(0)->setSelected(false);
- }
+ // deexpand all items
+ for(int a = 0; a < ui.treeDevices->topLevelItemCount(); a++)
+ ui.treeDevices->topLevelItem(a)->setExpanded(false);
+ //deselect the selected item(s)
+ for(int a = 0; a < ui.treeDevices->selectedItems().size(); a++)
+ ui.treeDevices->selectedItems().at(a)->setSelected(false);
// find the new item
// enumerate all platform items