diff options
| author | Andrey Butirsky <[email protected]> | 2021-09-09 17:59:36 +0300 |
|---|---|---|
| committer | Andrey Butirsky <[email protected]> | 2022-05-24 17:11:37 +0000 |
| commit | ff0a4938a5076f2cf84503f65747cfbdb0656c0e (patch) | |
| tree | 413ef97af4d74c56d642385c6a1ce32cc3ce4875 | |
| parent | a4292cf0680237719b32cb3ad8cc58540f7701b2 (diff) | |
fix: Dolphin right click and compress doesn't scroll
For newly created items being selected, we had updateViewState() called
twice, and the first call blocked work execution needed in the other one
| -rw-r--r-- | src/views/dolphinview.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index e6aecff80..c4e5be30a 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -1611,12 +1611,13 @@ void DolphinView::updateViewState() m_view->scrollToItem(currentIndex); m_scrollToCurrentItem = false; } + m_currentItemUrl = QUrl(); } else { selectionManager->setCurrentItem(0); } + } else { + m_currentItemUrl = QUrl(); } - - m_currentItemUrl = QUrl(); } if (!m_restoredContentsPosition.isNull()) { @@ -1651,8 +1652,10 @@ void DolphinView::updateViewState() } } - selectionManager->beginAnchoredSelection(selectionManager->currentItem()); - selectionManager->setSelectedItems(selectedItems); + if (!selectedItems.isEmpty()) { + selectionManager->beginAnchoredSelection(selectionManager->currentItem()); + selectionManager->setSelectedItems(selectedItems); + } } } } |
