X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/428a5cacceb9944b0ad803608de663cc84fcdadc..cfb135f24e6b1b3eb1253c8ebf7c8e7307974eea:/src/dolphinview.cpp diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 257809b67..3f8933bd3 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -866,16 +866,12 @@ void DolphinView::emitContentsMoved() void DolphinView::showHoverInformation(const KFileItem& item) { - if (!hasSelection()) { - emit requestItemInfo(item); - } + emit requestItemInfo(item); } void DolphinView::clearHoverInformation() { - if (m_active) { - emit requestItemInfo(KFileItem()); - } + emit requestItemInfo(KFileItem()); } void DolphinView::createView() @@ -1021,14 +1017,19 @@ void DolphinView::renameSelectedItems() } } } + } else if (DolphinSettings::instance().generalSettings()->renameInline()) { + Q_ASSERT(items.count() == 1); + + if (isColumnViewActive()) { + m_columnView->editItem(items.first()); + } else { + const QModelIndex dirIndex = m_dolphinModel->indexForItem(items.first()); + const QModelIndex proxyIndex = m_proxyModel->mapFromSource(dirIndex); + itemView()->edit(proxyIndex); + } } else { - // Only one item has been selected for renaming. Use the custom - // renaming mechanism from the views. Q_ASSERT(items.count() == 1); - // TODO: Think about using KFileItemDelegate as soon as it supports editing. - // Currently the RenameDialog is used, but I'm not sure whether inline renaming - // is a benefit for the user at all -> let's wait for some input first... RenameDialog dialog(this, items); if (dialog.exec() == QDialog::Rejected) { return;