Don't try and display the containment context menu when isContainment() is

false. Also, call Applet's contextMenuEvent() rather than calling
QGraphicsItem's directly.

CCBUG: 154552

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=753472
This commit is contained in:
Jason Stubbs 2007-12-27 15:14:51 +00:00
parent a5ad6a0675
commit cf71ae2c36

View File

@ -211,8 +211,8 @@ Corona* Containment::corona() const
void Containment::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) void Containment::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
{ {
//kDebug() << "let's see if we manage to get a context menu here, huh"; //kDebug() << "let's see if we manage to get a context menu here, huh";
if (!scene() || !KAuthorized::authorizeKAction("desktop_contextmenu")) { if (!isContainment() || !scene() || !KAuthorized::authorizeKAction("desktop_contextmenu")) {
QGraphicsItem::contextMenuEvent(event); Applet::contextMenuEvent(event);
return; return;
} }