]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Merge branch 'Applications/19.04'
authorNate Graham <nate@kde.org>
Wed, 10 Apr 2019 02:22:23 +0000 (20:22 -0600)
committerNate Graham <nate@kde.org>
Wed, 10 Apr 2019 02:22:23 +0000 (20:22 -0600)
src/dolphincontextmenu.cpp

index 439de930aab99b5f7f137dd6d8fa287059ce6282..d32d35dd37a4a7148bc30dc97a243a55d9e06b95 100644 (file)
@@ -351,7 +351,12 @@ void DolphinContextMenu::openViewportContextMenu()
     KFileItemActions fileItemActions;
     fileItemActions.setParentWidget(m_mainWindow);
     fileItemActions.setItemListProperties(baseUrlProperties);
-    addOpenWithActions(fileItemActions);
+
+    // Don't show "Open With" menu items if the current dir is empty, because there's
+    // generally no app that can do anything interesting with an empty directory
+    if (view->itemsCount() != 0) {
+        addOpenWithActions(fileItemActions);
+    }
 
     // Insert 'New Window' and 'New Tab' entries. Don't use "open_in_new_window" and
     // "open_in_new_tab" here, as the current selection should get ignored.