don't show empty context menus if that is what they are
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=722677
This commit is contained in:
parent
ae9727817f
commit
b1273b15d2
@ -223,6 +223,12 @@ void Containment::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
|
|||||||
//FIXME: change this to show this only in debug mode (or not at all?)
|
//FIXME: change this to show this only in debug mode (or not at all?)
|
||||||
// before final release
|
// before final release
|
||||||
QList<QAction*> actions = contextActions();
|
QList<QAction*> actions = contextActions();
|
||||||
|
|
||||||
|
if (actions.count() < 1) {
|
||||||
|
QGraphicsItem::contextMenuEvent(event);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
foreach(QAction* action, actions) {
|
foreach(QAction* action, actions) {
|
||||||
desktopMenu.addAction(action);
|
desktopMenu.addAction(action);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user