Safety++
Just to be sure, dear Bernhard, please double check that this does really fix the crash for you. =) BUG: 162436 Signed-off-by: Riccardo Iaconelli <riccardo@kde.org> svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=812085
This commit is contained in:
parent
c3b5446a59
commit
a2fb80dd0e
@ -408,16 +408,18 @@ void AppletHandle::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
|||||||
QList<Containment*> containments = corona->containments();
|
QList<Containment*> containments = corona->containments();
|
||||||
for (int i = 0; i < containments.size(); ++i) {
|
for (int i = 0; i < containments.size(); ++i) {
|
||||||
QPointF pos;
|
QPointF pos;
|
||||||
pos = containments[i]->view()->mapToScene(containments[i]->view()
|
if (containments[i]->view()) {
|
||||||
->mapFromGlobal(m_screenRect.topLeft()));
|
pos = containments[i]->view()->mapToScene(containments[i]->view()
|
||||||
|
->mapFromGlobal(m_screenRect.topLeft()));
|
||||||
|
|
||||||
if (containments[i]->sceneBoundingRect().contains(pos)) {
|
if (containments[i]->sceneBoundingRect().contains(pos)) {
|
||||||
//kDebug() << "new containment = " << containments[i];
|
//kDebug() << "new containment = " << containments[i];
|
||||||
kDebug() << "rect = " << containments[i]->sceneBoundingRect();
|
kDebug() << "rect = " << containments[i]->sceneBoundingRect();
|
||||||
// add the applet to the new containment and take it from the old one
|
// add the applet to the new containment and take it from the old one
|
||||||
kDebug() << "moving to other containment with position" << pos;;
|
kDebug() << "moving to other containment with position" << pos;;
|
||||||
switchContainment(containments[i], pos);
|
switchContainment(containments[i], pos);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user