don't hide the tool on *any* change - only hide when it's hidden, and delete when its action is deleted.

svn path=/trunk/KDE/kdelibs/; revision=923418
This commit is contained in:
Chani Armitage 2009-02-08 18:27:55 +00:00
parent 01f11ad43b
commit 297b131e1d

View File

@ -131,10 +131,16 @@ void ToolBox::addTool(QAction *action)
void ToolBox::updateToolBox()
{
Plasma::IconWidget *tool = qobject_cast<Plasma::IconWidget *>(sender());
if (tool && tool->action() == 0) {
delete tool;
tool = 0;
}
if (d->showing) {
d->showing = false;
showToolBox();
} else if (Plasma::IconWidget *tool = qobject_cast<Plasma::IconWidget *>(sender())) {
} else if (tool && !tool->isEnabled()) {
tool->hide();
}
}