don't escalate immutability on each save

Applet::immutability() is the maximum between internal applet immutability
and the immutability of its containment.
so not set higher immutability in the internal member of Applet
or the applet will not be able to be unlocked properly

Reviewed by: Sebastian Kügler <sebas@kde.org>
This commit is contained in:
Marco Martin 2014-07-03 14:12:21 +02:00
parent 3877ab378c
commit 573f48921e

View File

@ -157,7 +157,13 @@ void ContainmentPrivate::containmentConstraintsEvent(Plasma::Types::Constraints
// tell the applets too
foreach (Applet *a, applets) {
a->setImmutability(q->immutability());
/*Why qMin?
* the applets immutability() is the maximum between internal applet immutability
* and the immutability of its containment.
* so not set higher immutability in the internal member of Applet
* or the applet will not be able to be unlocked properly
*/
a->setImmutability(qMin(q->immutability(), a->d->immutability));
a->updateConstraints(Types::ImmutableConstraint);
}
}