mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
Always clear DolphinView's m_currentItemUrl member in updateViewState()
Before this patch, we still kept the URL in m_currentItemUrl if the URL was not found in the model. This could cause problems the next time updateViewState() was called, because the current index would then be set to 0, which could cause other issues. For example, all items between the first item in the view and a folder which was expanded in Details View could be selected. In principle, it is possible that updateViewState() is called multiple times if many large files are being pasted in the view, but since the item which should be made the current item (and which the view should be scrolled to) should always be the first pasted item, this change will most likely not cause any other problems. BUG: 329377 REVIEW: 119703 FIXED-IN: 4.14.0
This commit is contained in:
parent
4ed068ffff
commit
bf1ac8ee9b
|
@ -1289,11 +1289,11 @@ void DolphinView::updateViewState()
|
|||
m_view->scrollToItem(currentIndex);
|
||||
m_scrollToCurrentItem = false;
|
||||
}
|
||||
|
||||
m_currentItemUrl = KUrl();
|
||||
} else {
|
||||
selectionManager->setCurrentItem(0);
|
||||
}
|
||||
|
||||
m_currentItemUrl = KUrl();
|
||||
}
|
||||
|
||||
if (!m_restoredContentsPosition.isNull()) {
|
||||
|
|
Loading…
Reference in a new issue