mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Preserve selected items when changing folders
Based on the idea of Martin Tobias Holmedahl Sandsmark
This commit is contained in:
parent
41b0e42973
commit
8bc6d09c57
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue