X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/99c48acc8ea5e614e447a8f62d92c8d12e9cf58b..0464ea82a6850f58805bc4d6fc1df5369d83c3df:/src/views/dolphinview.cpp diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index d5908a081..0afa27d73 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -1174,6 +1174,9 @@ void DolphinView::slotItemContextMenuRequested(int index, const QPointF &pos) if (m_selectionChangedTimer->isActive()) { emitSelectionChangedSignal(); } + if (m_twoClicksRenamingTimer->isActive()) { + abortTwoClicksRenaming(); + } const KFileItem item = m_model->fileItem(index); Q_EMIT requestContextMenu(pos.toPoint(), item, selectedItems(), url()); @@ -1773,7 +1776,6 @@ void DolphinView::updateSelectionState() if (!selectedItems.isEmpty()) { selectionManager->beginAnchoredSelection(selectionManager->currentItem()); selectionManager->setSelectedItems(selectedItems); - selectionManager->endAnchoredSelection(); if (shouldScrollToCurrentItem) { m_view->scrollToItem(selectedItems.first()); } @@ -1881,7 +1883,7 @@ void DolphinView::selectNextItem() 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().constEnd()); if (lastSelectedIndex < 0) { Q_ASSERT_X(false, "DolphinView", "Selecting the next item failed."); return;