LocationConstraint isn't about pos(), but Plasma::Location
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=782307
This commit is contained in:
parent
7a107c9425
commit
56eda6927e
13
applet.cpp
13
applet.cpp
@ -1481,7 +1481,6 @@ QVariant Applet::itemChange(GraphicsItemChange change, const QVariant &value)
|
|||||||
|
|
||||||
void Applet::setGeometry(const QRectF& geometry)
|
void Applet::setGeometry(const QRectF& geometry)
|
||||||
{
|
{
|
||||||
Plasma::Constraints updatedConstraints(0);
|
|
||||||
QSizeF s = size();
|
QSizeF s = size();
|
||||||
QPointF p = pos();
|
QPointF p = pos();
|
||||||
|
|
||||||
@ -1493,15 +1492,9 @@ void Applet::setGeometry(const QRectF& geometry)
|
|||||||
d->background->resize(size());
|
d->background->resize(size());
|
||||||
}
|
}
|
||||||
|
|
||||||
updatedConstraints |= Plasma::SizeConstraint;
|
updateConstraints(Plasma::SizeConstraint);
|
||||||
}
|
emit geometryChanged();
|
||||||
|
} else if (p != pos()) {
|
||||||
if (p != pos()) {
|
|
||||||
updatedConstraints |= Plasma::LocationConstraint;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (updatedConstraints) {
|
|
||||||
updateConstraints(updatedConstraints);
|
|
||||||
emit geometryChanged();
|
emit geometryChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user