Also automatically hide dialogs from popupapplets if the last extender item is destroyed.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=875760
This commit is contained in:
parent
34f4813559
commit
d09ca6858f
@ -317,6 +317,15 @@ void ExtenderPrivate::addExtenderItem(ExtenderItem *item, const QPointF &pos)
|
||||
void ExtenderPrivate::removeExtenderItem(ExtenderItem *item)
|
||||
{
|
||||
attachedExtenderItems.removeOne(item);
|
||||
|
||||
//collapse the popupapplet if the last item is removed.
|
||||
if (!q->attachedItems().count()) {
|
||||
PopupApplet *popupApplet = qobject_cast<PopupApplet*>(applet);
|
||||
if (popupApplet) {
|
||||
popupApplet->hidePopup();
|
||||
}
|
||||
}
|
||||
|
||||
q->itemRemovedEvent(item);
|
||||
updateBorders();
|
||||
}
|
||||
|
@ -203,14 +203,6 @@ void ExtenderItem::setExtender(Extender *extender, const QPointF &pos)
|
||||
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.
|
||||
if (d->hostApplet() && (extender != d->extender)) {
|
||||
KConfigGroup c = extender->d->applet->config("ExtenderItems");
|
||||
|
Loading…
Reference in New Issue
Block a user