order of operations can be important; dragging between containments still isn't perfect as there is somethings a "jump" of the applet on mouse over before it settles in to where it should be, but this gets a bit closer
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=742102
This commit is contained in:
parent
0374286c07
commit
37498d2541
@ -226,8 +226,8 @@ void AppletHandle::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||
m_containment->emitLaunchActivated();
|
||||
m_applet->showConfigurationInterface();
|
||||
} else if (m_pressedButton == RemoveButton) {
|
||||
Phase::self()->animateItem(m_applet, Phase::Disappear);
|
||||
forceDisappear();
|
||||
Phase::self()->animateItem(m_applet, Phase::Disappear);
|
||||
}
|
||||
}
|
||||
|
||||
@ -274,14 +274,13 @@ void AppletHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
|
||||
QPointF scenePosition = scenePos();
|
||||
kDebug() << "moving to other containment with position" << event->pos() << event->scenePos();
|
||||
kDebug() << "position before reparenting" << pos() << scenePos();
|
||||
m_applet->removeSceneEventFilter(m_containment);
|
||||
m_containment = containments[i];
|
||||
//m_containment->addChild(m_applet);
|
||||
//setParentItem(containments[i]);
|
||||
m_containment->addApplet(m_applet);
|
||||
setPos(m_containment->mapFromScene(scenePosition));
|
||||
m_applet->installSceneEventFilter(m_containment);
|
||||
setParentItem(m_containment);
|
||||
m_applet->setParentItem(this);
|
||||
setPos(m_containment->mapFromScene(scenePosition));
|
||||
update();
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user