BUGFIX: Applet::setConfigurationRequired(bool needsConfig) now destroys also the button when needsConfig is false.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=820338
This commit is contained in:
Davide Bettio 2008-06-13 22:12:23 +00:00
parent 738d0547a6
commit d489ddc1ea

View File

@ -673,13 +673,14 @@ void Applet::setConfigurationRequired(bool needsConfig)
d->needsConfigOverlay->setZValue(zValue);
qDeleteAll(d->needsConfigOverlay->QGraphicsItem::children());
QGraphicsLinearLayout *configLayout = new QGraphicsLinearLayout(this);
QGraphicsLinearLayout *configLayout = new QGraphicsLinearLayout(d->needsConfigOverlay);
configLayout->setContentsMargins(0, 0, 0, 0);
PushButton *configWidget = new PushButton(this);
PushButton *configWidget = new PushButton(d->needsConfigOverlay);
configWidget->setText(i18n("Configure..."));
connect(configWidget, SIGNAL(clicked()), this, SLOT(showConfigurationInterface()));
configLayout->addStretch();
configLayout->addItem(configWidget);
setLayout(configLayout);
d->needsConfigOverlay->setLayout(configLayout);
d->needsConfigOverlay->show();
}