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:
parent
01f11ad43b
commit
297b131e1d
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user