From b8a4e0fac2820ec8fc442c2abeea700ae4947e01 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 18 Jun 2008 19:34:03 +0000 Subject: Assure that when requesting the context menu for the column-view, that the correct items are used. TODO for 4.2: get rid of those 'if (isColumnViewActive())' special cases and provide a generic model which also works with the way the column view is implemented BUG: 164146 svn path=/trunk/KDE/kdebase/apps/; revision=821903 --- src/dolphincontextmenu.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/dolphincontextmenu.cpp') diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index b2ec59e15..1af74b2e3 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -337,7 +337,8 @@ QString DolphinContextMenu::placesName(const KUrl& url) const QAction* DolphinContextMenu::createPasteAction() { QAction* action = 0; - if ((m_selectedItems.count() == 1) && m_fileInfo.isDir()) { + const bool isDir = !m_fileInfo.isNull() && m_fileInfo.isDir(); + if (isDir && (m_selectedItems.count() == 1)) { action = new QAction(KIcon("edit-paste"), i18nc("@action:inmenu", "Paste Into Folder"), this); const QMimeData* mimeData = QApplication::clipboard()->mimeData(); const KUrl::List pasteData = KUrl::List::fromMimeData(mimeData); -- cgit v1.3