┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinpart.cpp
diff options
context:
space:
mode:
authorRafael Fernández López <[email protected]>2008-03-05 22:25:01 +0000
committerRafael Fernández López <[email protected]>2008-03-05 22:25:01 +0000
commit7244399154e1e638e9f9a76fbc799e210942ff5d (patch)
treeda86fab07ba20b3f1a553452951f4dfca04e75b1 /src/dolphinpart.cpp
parentf34101267c0781c8b7851277ba153af1a435e9d5 (diff)
Fix a crash when right clicking on the viewport and no items selected.
CCMAIL: [email protected] svn path=/trunk/KDE/kdebase/apps/; revision=782768
Diffstat (limited to 'src/dolphinpart.cpp')
-rw-r--r--src/dolphinpart.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp
index aa1bb6d7c..0ea761d2d 100644
--- a/src/dolphinpart.cpp
+++ b/src/dolphinpart.cpp
@@ -327,7 +327,10 @@ void DolphinPart::slotOpenContextMenu(const KFileItem& _item, const KUrl&)
editActions.append(actionCollection()->action("delete"));
actionGroups.insert("editactions", editActions);
- KFileItemList items = m_view->selectedItems();
+ // TODO: We should change the signature of the slots (and signals) for being able
+ // to tell for which items we want a popup.
+ KFileItemList items = (m_view->selectedItems().count() ? m_view->selectedItems()
+ : KFileItemList() << item);
emit m_extension->popupMenu(QCursor::pos(),
items,
KParts::OpenUrlArguments(),