Close popup after detaching the last item.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=861034
This commit is contained in:
Rob Scheepmaker 2008-09-14 22:43:53 +00:00
parent 635ec0419c
commit f24cd77e45

View File

@ -421,6 +421,14 @@ void ExtenderItem::setExtender(Extender *extender, const QPointF &pos)
if (d->extender) {
d->extender->d->removeExtenderItem(this);
emit d->extender->itemDetached(this);
//collapse the popupapplet if the last item is removed.
if (!d->extender->attachedItems().count()) {
PopupApplet *applet = qobject_cast<PopupApplet*>(d->extender->d->applet);
if (applet) {
applet->hidePopup();
}
}
}
//move the configuration.