From b1273b15d299d67c67a8e26fa18f3fcd49d2b97e Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Sun, 7 Oct 2007 21:53:20 +0000 Subject: [PATCH] don't show empty context menus if that is what they are svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=722677 --- containment.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/containment.cpp b/containment.cpp index b033229b1..2a82b6e8f 100644 --- a/containment.cpp +++ b/containment.cpp @@ -223,6 +223,12 @@ void Containment::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) //FIXME: change this to show this only in debug mode (or not at all?) // before final release QList actions = contextActions(); + + if (actions.count() < 1) { + QGraphicsItem::contextMenuEvent(event); + return; + } + foreach(QAction* action, actions) { desktopMenu.addAction(action); }