mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
Fix a crash when right clicking on the viewport and no items selected.
CCMAIL: edulix@gmail.com svn path=/trunk/KDE/kdebase/apps/; revision=782768
This commit is contained in:
parent
f34101267c
commit
7244399154
1 changed files with 4 additions and 1 deletions
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue