diff options
Diffstat (limited to 'lumina-fm')
-rw-r--r-- | lumina-fm/MainUI.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp index ab6a06e0..da970fed 100644 --- a/lumina-fm/MainUI.cpp +++ b/lumina-fm/MainUI.cpp @@ -434,11 +434,17 @@ void MainUI::setCurrentDir(QString dir){ if(radio_view_details->isChecked()){ ui->tree_dir_view->setRootIndex(fsmod->index(dir)); ui->tree_dir_view->selectionModel()->clearSelection(); - if(olddir.startsWith(rawdir)){ ui->tree_dir_view->selectionModel()->setCurrentIndex( fsmod->index(olddir),QItemSelectionModel::SelectCurrent ); } + if(olddir.startsWith(rawdir)){ + ui->tree_dir_view->setCurrentIndex( fsmod->index(olddir)); + ui->tree_dir_view->scrollTo( fsmod->index(olddir)); + } }else{ ui->list_dir_view->setRootIndex(fsmod->index(dir)); ui->list_dir_view->selectionModel()->clearSelection(); - if(olddir.startsWith(rawdir)){ ui->list_dir_view->selectionModel()->setCurrentIndex( fsmod->index(olddir),QItemSelectionModel::SelectCurrent ); } + if(olddir.startsWith(rawdir)){ + ui->list_dir_view->setCurrentIndex( fsmod->index(olddir)); + ui->list_dir_view->scrollTo( fsmod->index(olddir)); + } } //Adjust the tab data tabBar->setTabWhatsThis( tabBar->currentIndex(), rawdir ); |