don't create the toolbox unnecessarily
there's really no point trying to mess with specific tools when the toolbox itself isn't there. svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=786440
This commit is contained in:
parent
863e0f7797
commit
1f6956398d
@ -1246,12 +1246,17 @@ Plasma::Widget * Containment::addToolBoxTool(const QString& toolName, const QStr
|
||||
|
||||
void Containment::enableToolBoxTool(const QString &toolname, bool enable)
|
||||
{
|
||||
d->createToolbox()->enableTool(toolname, enable);
|
||||
if (d->toolbox) {
|
||||
d->toolbox->enableTool(toolname, enable);
|
||||
}
|
||||
}
|
||||
|
||||
bool Containment::isToolboxToolEnabled(const QString &toolname) const
|
||||
{
|
||||
return d->createToolbox()->isToolEnabled(toolname);
|
||||
if (d->toolbox) {
|
||||
return d->toolbox->isToolEnabled(toolname);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Containment::showToolbox()
|
||||
|
Loading…
Reference in New Issue
Block a user