]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphinview.cpp
Remove the preserving of the selected items in reload(), this is already covered
[dolphin.git] / src / views / dolphinview.cpp
index 9728e58c3e47b86a57232dc2fa20d4083b365caf..bf806055bf79cb62014eb0d74d2e1b82d92877e3 100644 (file)
@@ -454,10 +454,6 @@ void DolphinView::reload()
     QDataStream saveStream(&viewState, QIODevice::WriteOnly);
     saveState(saveStream);
 
-    const KFileItemList itemList = selectedItems();
-    m_selectedUrls.clear();
-    m_selectedUrls = itemList.urlList();
-
     setUrl(url());
     loadDirectory(url(), true);
 
@@ -585,7 +581,6 @@ void DolphinView::setUrl(const QUrl& url)
 
     clearSelection();
 
-    emit urlAboutToBeChanged(url);
     m_url = url;
 
     hideToolTip();
@@ -1212,6 +1207,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;
 
@@ -1236,6 +1234,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();