don't allow to drag applets registered as drag handle when the

containment is locked
BUG: 162584

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=812459
This commit is contained in:
Marco Martin 2008-05-25 14:10:47 +00:00
parent 8edc0b399f
commit 8c285fdee5

View File

@ -974,7 +974,8 @@ bool Applet::sceneEventFilter( QGraphicsItem * watched, QEvent * event )
{ {
switch (event->type()) { switch (event->type()) {
case QEvent::GraphicsSceneMouseMove: { case QEvent::GraphicsSceneMouseMove: {
if (d->registeredAsDragHandle.contains( watched )) { //don't move when the containment is not mutable, in the rare case the containment doesn't exists consider it as mutable
if ((!containment() || containment()->immutability() == Mutable) && d->registeredAsDragHandle.contains( watched )) {
mouseMoveEvent(static_cast<QGraphicsSceneMouseEvent*>(event)); mouseMoveEvent(static_cast<QGraphicsSceneMouseEvent*>(event));
return true; return true;
} }