whoops, forgot this other half of the commit
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=718011
This commit is contained in:
parent
455d9faf55
commit
8f4ed43ae0
@ -411,32 +411,5 @@ void Widget::reparent(Widget *w)
|
||||
update();
|
||||
}
|
||||
|
||||
void Widget::contextMenuEvent(QGraphicsSceneContextMenuEvent *contextMenuEvent)
|
||||
{
|
||||
//kDebug() << "context menu event!";
|
||||
if (!scene()) {
|
||||
return;
|
||||
}
|
||||
Widget* item = dynamic_cast<Widget*>(parentItem());
|
||||
|
||||
if (!item) {
|
||||
QGraphicsItem::contextMenuEvent(contextMenuEvent);
|
||||
return;
|
||||
}
|
||||
|
||||
while (item && item->parentItem()) {
|
||||
item = dynamic_cast<Widget*>(item->parentItem());
|
||||
}
|
||||
|
||||
if (!item) {
|
||||
QGraphicsItem::contextMenuEvent(contextMenuEvent);
|
||||
return;
|
||||
}
|
||||
|
||||
item->contextMenuEvent(contextMenuEvent);
|
||||
contextMenuEvent->accept();
|
||||
return;
|
||||
}
|
||||
|
||||
} // Plasma namespace
|
||||
|
||||
|
@ -255,7 +255,6 @@ protected:
|
||||
* @param widget the parent QWidget (most likely the Corona)
|
||||
*/
|
||||
virtual void paintWidget(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
||||
void contextMenuEvent(QGraphicsSceneContextMenuEvent *contextMenuEvent);
|
||||
|
||||
private:
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
||||
|
Loading…
Reference in New Issue
Block a user