1
0
Fork 0
forked from len0rd/rockbox

When collapsing the devices tree upon detection collapse all.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14535 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Riebeling 2007-08-30 18:14:56 +00:00
parent c14731733a
commit 4146da5565

View file

@ -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