]> cloud.milkyroute.net Git - dolphin.git/commitdiff
open the context-menu for the viewport if no selection is given although the mouse...
authorPeter Penz <peter.penz19@gmail.com>
Mon, 19 Nov 2007 19:58:00 +0000 (19:58 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Mon, 19 Nov 2007 19:58:00 +0000 (19:58 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=738816

src/dolphincontextmenu.cpp

index a7a5ae567cc6d28d454396b1ac7e4cf80d5f0b7a..e7f4bceaac35b50bc4ff1ed8a44a22bd06ae8f20 100644 (file)
@@ -75,7 +75,7 @@ void DolphinContextMenu::open()
         m_context |= TrashContext;
     }
 
-    if (!m_fileInfo.isNull()) {
+    if (!m_fileInfo.isNull() && (m_selectedItems.count() > 0)) {
         m_context |= ItemContext;
         // TODO: handle other use cases like devices + desktop files
     }
@@ -219,7 +219,6 @@ void DolphinContextMenu::openItemContextMenu()
 
 void DolphinContextMenu::openViewportContextMenu()
 {
-    Q_ASSERT(m_fileInfo.isNull());
     KMenu* popup = new KMenu(m_mainWindow);
 
     addShowMenubarAction(popup);