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
This commit is contained in:
Marco Martin 2010-04-07 13:48:43 +00:00
parent 9dc655c6df
commit a45a7fe57a

View File

@ -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);
}
}
}