X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/95542a389112491abf3a31c338e7d78f7785f48e..0464ea82a6850f58805bc4d6fc1df5369d83c3df:/src/views/dolphinview.cpp diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index a18f53769..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; @@ -2285,6 +2287,22 @@ bool DolphinView::isFolderWritable() const return m_isFolderWritable; } +int DolphinView::horizontalScrollBarHeight() const +{ + if (m_container && m_container->horizontalScrollBar() && m_container->horizontalScrollBar()->isVisible()) { + return m_container->horizontalScrollBar()->height(); + } + return 0; +} + +void DolphinView::setStatusBarOffset(int offset) +{ + KItemListView *view = m_container->controller()->view(); + if (view) { + view->setStatusBarOffset(offset); + } +} + QUrl DolphinView::viewPropertiesUrl() const { if (m_viewPropertiesContext.isEmpty()) { @@ -2424,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; } }