diff options
| author | Emmanuel Pescosta <[email protected]> | 2017-02-18 20:48:49 +0100 |
|---|---|---|
| committer | Emmanuel Pescosta <[email protected]> | 2017-02-18 20:48:49 +0100 |
| commit | 8bc6d09c57eb0a976e9b4f9ee002a48664dfe277 (patch) | |
| tree | c983698fefc7f63bbe17f998642116ab5c903c86 /src | |
| parent | 41b0e4297313b6549f9178c77c30101a42b0525f (diff) | |
Preserve selected items when changing folders
Based on the idea of Martin Tobias Holmedahl Sandsmark
Diffstat (limited to 'src')
| -rw-r--r-- | src/views/dolphinview.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index c7267cee0..ed4a1244c 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -1211,6 +1211,9 @@ void DolphinView::restoreState(QDataStream& stream) // Restore the current item that had the keyboard focus stream >> m_currentItemUrl; + // Restore the previously selected items + stream >> m_selectedUrls; + // Restore the view position stream >> m_restoredContentsPosition; @@ -1235,6 +1238,9 @@ void DolphinView::saveState(QDataStream& stream) stream << QUrl(); } + // Save the selected urls + stream << selectedItems().urlList(); + // Save view position const qreal x = m_container->horizontalScrollBar()->value(); const qreal y = m_container->verticalScrollBar()->value(); |
