┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/dolphinview.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-12-06 21:15:36 +0100
committerPeter Penz <[email protected]>2011-12-06 21:17:01 +0100
commit9d5d18739fde76f2d606a4cc9f1e7cc442faa7e0 (patch)
tree6079793840ce5b98c061c64552a20122f843773f /src/views/dolphinview.cpp
parent9135ff953740f27686e3c5e11dce5b8cae6cd0d0 (diff)
Selection and current item fixes
- Remember selection + current item when switching view-modes - Fix the current item indicator alignment for selections - Set the item as current item when the selection toggle has been clicked
Diffstat (limited to 'src/views/dolphinview.cpp')
-rw-r--r--src/views/dolphinview.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp
index 94eed5cf3..d839c61a3 100644
--- a/src/views/dolphinview.cpp
+++ b/src/views/dolphinview.cpp
@@ -1135,6 +1135,11 @@ void DolphinView::applyViewProperties()
// has been modified.
const bool restoreModel = (model->count() > 0);
if (restoreModel) {
+ const int currentItemIndex = m_container->controller()->selectionManager()->currentItem();
+ if (currentItemIndex >= 0) {
+ m_currentItemUrl = model->fileItem(currentItemIndex).url();
+ }
+ m_selectedUrls = selectedItems().urlList();
model->clear();
}