diff options
author | Ken Moore <ken@pcbsd.org> | 2015-05-11 14:38:09 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-05-11 14:38:09 -0400 |
commit | dee81bf75faf2d894b4801d5ea79318d7f41b682 (patch) | |
tree | b2c2d3d5b0a5590429f510ca37ce5b156e4c59eb | |
parent | Put in a quick check/safeguard for invalid panel sizing. (diff) | |
download | lumina-dee81bf75faf2d894b4801d5ea79318d7f41b682.tar.gz lumina-dee81bf75faf2d894b4801d5ea79318d7f41b682.tar.bz2 lumina-dee81bf75faf2d894b4801d5ea79318d7f41b682.zip |
When making a previous selection visible in the viewport, try to put it at the top of the viewport.
-rw-r--r-- | lumina-fm/MainUI.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp index da970fed..1c832b1a 100644 --- a/lumina-fm/MainUI.cpp +++ b/lumina-fm/MainUI.cpp @@ -436,14 +436,14 @@ void MainUI::setCurrentDir(QString dir){ ui->tree_dir_view->selectionModel()->clearSelection(); if(olddir.startsWith(rawdir)){ ui->tree_dir_view->setCurrentIndex( fsmod->index(olddir)); - ui->tree_dir_view->scrollTo( fsmod->index(olddir)); + ui->tree_dir_view->scrollTo( fsmod->index(olddir), QAbstractItemView::PositionAtTop); } }else{ ui->list_dir_view->setRootIndex(fsmod->index(dir)); ui->list_dir_view->selectionModel()->clearSelection(); if(olddir.startsWith(rawdir)){ ui->list_dir_view->setCurrentIndex( fsmod->index(olddir)); - ui->list_dir_view->scrollTo( fsmod->index(olddir)); + ui->list_dir_view->scrollTo( fsmod->index(olddir), QAbstractItemView::PositionAtTop); } } //Adjust the tab data |