don't accept drops hovered not right on us (how silly is it to have graphicsitems transparent to rejected drops?!)

BUG:164469

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=823313
This commit is contained in:
Aaron J. Seigo 2008-06-23 00:13:03 +00:00
parent 587e0f8418
commit b114545f24
2 changed files with 11 additions and 0 deletions

View File

@ -709,6 +709,12 @@ void Containment::dragEnterEvent(QGraphicsSceneDragDropEvent *event)
KUrl::List::canDecode(event->mimeData())));
}
void Containment::dragMoveEvent(QGraphicsSceneDragDropEvent *event)
{
QGraphicsItem *item = scene()->itemAt(event->scenePos());
event->setAccepted(item == this || !item);
}
void Containment::dropEvent(QGraphicsSceneDragDropEvent *event)
{
//kDebug() << event->mimeData()->text();

View File

@ -392,6 +392,11 @@ class PLASMA_EXPORT Containment : public Applet
*/
void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
/**
* @reimplemented from QGraphicsItem
*/
void dragMoveEvent(QGraphicsSceneDragDropEvent *event);
/**
* @reimplemented from QGraphicsItem
*/