make applet immutable actually have some effect (e.g. make it immovable)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=679064
This commit is contained in:
Aaron J. Seigo 2007-06-22 22:08:04 +00:00
parent 3fd8500159
commit ead42c31b4

View File

@ -168,6 +168,13 @@ bool Applet::immutable() const
void Applet::setImmutable(bool immutable)
{
d->immutable = immutable;
QGraphicsItem::GraphicsItemFlags f = flags();
if (immutable) {
f ^= QGraphicsItem::ItemIsMovable;
} else if (!static_cast<Corona*>(scene())->immutable()) {
f |= QGraphicsItem::ItemIsMovable;
}
setFlags(f);
}
bool Applet::drawStandardBackground()