KDE/kdebase/workspace/libs/plasma/widgets

Aaron J. Seigo aseigo at kde.org
Fri Mar 14 17:59:11 CET 2008


SVN commit 785670 by aseigo:

only remove it implicitly from our layout if the item is actually being removed from us (not just being stuffed into a child); in the case of a child becoming a grandchild, it will need to be explicitly added to a new layout or removed from an existing one.

prevents applethandle from causing applets to be removed from the FreeLayout in the DefaultDesktopp containment, as seen by Ivan

CCMAIL:panel-devel at kde.org


 M  +2 -1      widget.cpp  


--- trunk/KDE/kdebase/workspace/libs/plasma/widgets/widget.cpp #785669:785670
@@ -270,6 +270,7 @@
         }
 
         if (managingLayout()) {
+            //kDebug() << "invalidating managing layout";
             managingLayout()->invalidate();
         }
     }
@@ -409,7 +410,7 @@
 QVariant Widget::itemChange(GraphicsItemChange change, const QVariant &value)
 {
     if (change == QGraphicsItem::ItemChildRemovedChange) {
-        if (layout()) {
+        if (layout() && !isAncestorOf(value.value<QGraphicsItem*>())) {
             layout()->removeItem(dynamic_cast<Plasma::LayoutItem*>(value.value<QGraphicsItem*>()));
             updateGeometry();
         }


More information about the Panel-devel mailing list