QDataStream saveStream(&viewState, QIODevice::WriteOnly);
saveState(saveStream);
- const KFileItemList itemList = selectedItems();
- m_selectedUrls.clear();
- m_selectedUrls = itemList.urlList();
-
setUrl(url());
loadDirectory(url(), true);
clearSelection();
- emit urlAboutToBeChanged(url);
m_url = url;
hideToolTip();
// 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;
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();