mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
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
This commit is contained in:
parent
a4292cf068
commit
ff0a4938a5
|
@ -1611,13 +1611,14 @@ void DolphinView::updateViewState()
|
|||
m_view->scrollToItem(currentIndex);
|
||||
m_scrollToCurrentItem = false;
|
||||
}
|
||||
m_currentItemUrl = QUrl();
|
||||
} else {
|
||||
selectionManager->setCurrentItem(0);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
m_currentItemUrl = QUrl();
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_restoredContentsPosition.isNull()) {
|
||||
const int x = m_restoredContentsPosition.x();
|
||||
|
@ -1651,11 +1652,13 @@ void DolphinView::updateViewState()
|
|||
}
|
||||
}
|
||||
|
||||
if (!selectedItems.isEmpty()) {
|
||||
selectionManager->beginAnchoredSelection(selectionManager->currentItem());
|
||||
selectionManager->setSelectedItems(selectedItems);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DolphinView::hideToolTip(const ToolTipManager::HideBehavior behavior)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue