# # # patch "src/view/Guitone.cpp" # from [913b14d2673d800dc2ed3592e8f2247a83fcc6a0] # to [2ae731a3f3d484a6f40ba8b8ca0ac778b8f94943] # ============================================================ --- src/view/Guitone.cpp 913b14d2673d800dc2ed3592e8f2247a83fcc6a0 +++ src/view/Guitone.cpp 2ae731a3f3d484a6f40ba8b8ca0ac778b8f94943 @@ -115,6 +115,7 @@ void Guitone::slotMapFolderTreeToFileList( const QModelIndex &proxyIndex ) { +// treeView->setExpanded(treeView->selectionModel()->currentIndex(), false); QModelIndex index = proxyModelFolderTree->mapToSource( proxyIndex ); index = proxyModelFileList->mapFromSource( index ); listView->setRootIndex(index); @@ -127,10 +128,14 @@ if(item->isDirectory()) { +// treeView->setExpanded(treeView->selectionModel()->currentIndex(), false); listView->setRootIndex(proxyIndex); index = proxyModelFolderTree->mapFromSource( index ); - treeView->expand(index); - treeView->selectionModel()->setCurrentIndex(index, QItemSelectionModel::NoUpdate); + //if(item->childCount() > 0) + //{ + // treeView->expand(index); + //} + treeView->selectionModel()->setCurrentIndex(index, QItemSelectionModel::ClearAndSelect); } }