aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm/MainUI.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-05-11 09:32:16 -0400
committerKen Moore <ken@pcbsd.org>2015-05-11 09:32:16 -0400
commita11293f42c8be383efe4289c1d660f2d6c3882e5 (patch)
tree7e1dcf56e6512c8341ee724d7b5081b013bb05bd /lumina-fm/MainUI.cpp
parentClean up the new theme modifications a bit to remove some duplications and un... (diff)
downloadlumina-a11293f42c8be383efe4289c1d660f2d6c3882e5.tar.gz
lumina-a11293f42c8be383efe4289c1d660f2d6c3882e5.tar.bz2
lumina-a11293f42c8be383efe4289c1d660f2d6c3882e5.zip
When moving back/up a directory in lumina-fm, have it automatically select the previous directory in the list.
Diffstat (limited to 'lumina-fm/MainUI.cpp')
-rw-r--r--lumina-fm/MainUI.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp
index 68764997..ab6a06e0 100644
--- a/lumina-fm/MainUI.cpp
+++ b/lumina-fm/MainUI.cpp
@@ -434,9 +434,11 @@ 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 ); }
}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 ); }
}
//Adjust the tab data
tabBar->setTabWhatsThis( tabBar->currentIndex(), rawdir );
@@ -462,7 +464,7 @@ void MainUI::setCurrentDir(QString dir){
if(isUserWritable){ ui->label_dir_stats->setText(""); }
else{ ui->label_dir_stats->setText(tr("Limited Access Directory"));
}
-
+
ui->tool_addToDir->setVisible(isUserWritable);
ui->tool_addNewFile->setVisible(isUserWritable);
ui->actionUpDir->setEnabled(dir!="/");
@@ -470,6 +472,7 @@ void MainUI::setCurrentDir(QString dir){
ui->actionBookMark->setEnabled( rawdir!=QDir::homePath() && settings->value("bookmarks", QStringList()).toStringList().filter("::::"+rawdir).length()<1 );
ItemSelectionChanged();
RebuildDeviceMenu(); //keep this refreshed
+
}
QFileInfoList MainUI::getSelectedItems(){
bgstack15