From f242476e722527fdd8e15eb8a2b7e19c723dfeef Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Sun, 11 Nov 2007 09:22:17 +0000 Subject: [PATCH] items were getting added to the same layout more than once. now that the desktop actually knows what its layout is, this screws things up pretty badly. so fix that. however, the panel is now screwed and will be until i write a proper layout for it. be warned: i really don't want to hear about the panel until then. svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=735280 --- widgets/layoutitem.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/widgets/layoutitem.cpp b/widgets/layoutitem.cpp index e485c32e1..ec1fb121f 100644 --- a/widgets/layoutitem.cpp +++ b/widgets/layoutitem.cpp @@ -110,6 +110,10 @@ Layout* LayoutItem::layout() const void LayoutItem::setManagingLayout(Layout* layout) { + if (layout == d->managingLayout) { + return; + } + if (d->managingLayout) { d->managingLayout->removeItem(this); }