X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/a27443d904bc220615f2c4e8df74187b0c806d8a..0464ea82a6850f58805bc4d6fc1df5369d83c3df:/src/views/dolphinview.cpp diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index fc4f5e2df..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; @@ -2440,7 +2442,7 @@ bool DolphinView::tryShowNameToolTip(QHelpEvent *event) const KFileItem item = m_model->fileItem(index.value()); const QString text = item.text(); const QPoint pos = mapToGlobal(event->pos()); - QToolTip::showText(pos, text); + QToolTip::showText(pos, text, this); return true; } }