if (!selectedItems.isEmpty()) {
selectionManager->beginAnchoredSelection(selectionManager->currentItem());
selectionManager->setSelectedItems(selectedItems);
- selectionManager->endAnchoredSelection();
if (shouldScrollToCurrentItem) {
m_view->scrollToItem(selectedItems.first());
}
Q_ASSERT_X(false, "DolphinView", "Selecting the next item failed.");
return;
}
- const auto lastSelectedIndex = m_model->index(selectedItems().last());
+ const auto lastSelectedIndex = m_model->index(selectedItems().constLast());
if (lastSelectedIndex < 0) {
Q_ASSERT_X(false, "DolphinView", "Selecting the next item failed.");
return;