* don't emit updateGeometry twice
* fix coding style svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800757
This commit is contained in:
parent
a9d9dfea46
commit
9425318d08
12
applet.cpp
12
applet.cpp
@ -1524,20 +1524,16 @@ void Applet::setGeometry(const QRectF& geometry)
|
|||||||
{
|
{
|
||||||
QRectF beforeGeom = QGraphicsWidget::geometry();
|
QRectF beforeGeom = QGraphicsWidget::geometry();
|
||||||
QGraphicsWidget::setGeometry(geometry);
|
QGraphicsWidget::setGeometry(geometry);
|
||||||
if (geometry.size() != beforeGeom.size())
|
if (geometry.size() != beforeGeom.size()) {
|
||||||
{
|
|
||||||
updateConstraints(Plasma::SizeConstraint);
|
updateConstraints(Plasma::SizeConstraint);
|
||||||
if (d->background) {
|
if (d->background) {
|
||||||
d->background->resizePanel(boundingRect().size());
|
d->background->resizePanel(boundingRect().size());
|
||||||
}
|
}
|
||||||
emit geometryChanged();
|
emit geometryChanged();
|
||||||
}
|
} else if (geometry.topLeft() != beforeGeom.topLeft()) {
|
||||||
if (geometry.topLeft() != beforeGeom.topLeft())
|
/*if (d->background) {
|
||||||
{
|
|
||||||
if (d->background) {
|
|
||||||
|
|
||||||
kDebug() << QGraphicsWidget::geometry();
|
kDebug() << QGraphicsWidget::geometry();
|
||||||
}
|
}*/
|
||||||
emit geometryChanged();
|
emit geometryChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user