From a45a7fe57a07498a37c25adac126da2569ce92ca Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 7 Apr 2010 13:48:43 +0000 Subject: [PATCH] remove the widget from the layout if it's hidderemove the widget from the layout if it's hidden svn path=/trunk/KDE/kdelibs/; revision=1112157 --- extenders/extenderitem.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extenders/extenderitem.cpp b/extenders/extenderitem.cpp index 1e0ffe932..b4c4b22a4 100644 --- a/extenders/extenderitem.cpp +++ b/extenders/extenderitem.cpp @@ -512,6 +512,11 @@ void ExtenderItem::setCollapsed(bool collapsed) d->collapseIcon->setToolTip(collapsed ? i18n("Expand this widget") : i18n("Collapse this widget")); if (d->widget) { d->widget->setVisible(!collapsed); + if (collapsed) { + d->layout->removeItem(d->widget); + } else { + d->layout->insertItem(1, d->widget); + } } }