immediately save immutability and geometry settings when setting
this prevents them getting nuked when also writing to the config with writeConfig which in turn triggers a config reload (without those values!) later on
This commit is contained in:
parent
6095abcdbf
commit
932e547cd9
@ -234,6 +234,14 @@ void Applet::setLocked(bool locked)
|
||||
}
|
||||
|
||||
app->setImmutability(locked ? Plasma::UserImmutable : Plasma::Mutable);
|
||||
KConfigGroup cg = app->config();
|
||||
if (!app->isContainment()) {
|
||||
cg = cg.parent();
|
||||
}
|
||||
|
||||
if (cg.isValid()) {
|
||||
cg.writeEntry("immutability", (int)app->immutability());
|
||||
}
|
||||
}
|
||||
|
||||
bool Applet::locked() const
|
||||
|
@ -161,6 +161,10 @@ void Widget::setGeometry(const QRectF &geometry)
|
||||
{
|
||||
if (d->applet) {
|
||||
d->applet.data()->setGeometry(geometry);
|
||||
KConfigGroup cg = d->applet.data()->config().parent();
|
||||
if (cg.isValid()) {
|
||||
cg.writeEntry("geometry", geometry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user