┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views
diff options
context:
space:
mode:
Diffstat (limited to 'src/views')
-rw-r--r--src/views/dolphinview.cpp5
-rw-r--r--src/views/dolphinview.h5
2 files changed, 8 insertions, 2 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();
}
diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h
index 9111516b4..b8a1077f7 100644
--- a/src/views/dolphinview.h
+++ b/src/views/dolphinview.h
@@ -757,10 +757,11 @@ private:
QTimer* m_selectionChangedTimer;
- KUrl m_currentItemUrl;
+ KUrl m_currentItemUrl; // Used for making the view to remember the current URL after F5
QPoint m_restoredContentsPosition;
KUrl m_createdItemUrl; // URL for a new item that got created by the "Create New..." menu
- QList<KUrl> m_selectedUrls; // this is used for making the View to remember selections after F5
+
+ QList<KUrl> m_selectedUrls; // Used for making the view to remember selections after F5
VersionControlObserver* m_versionControlObserver;