some basic guards; much, much more to follow but first must move files around
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738887
This commit is contained in:
parent
9b25961432
commit
26098964a9
@ -128,7 +128,6 @@ void BorderLayout::invalidate()
|
|||||||
d->itemPositions[CenterPositioned]->setGeometry(QRectF(
|
d->itemPositions[CenterPositioned]->setGeometry(QRectF(
|
||||||
origin + QPointF(left, top), QSizeF(right - left, bottom - top)));
|
origin + QPointF(left, top), QSizeF(right - left, bottom - top)));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QSizeF BorderLayout::sizeHint() const
|
QSizeF BorderLayout::sizeHint() const
|
||||||
|
@ -437,7 +437,6 @@ void BoxLayout::setGeometry(const QRectF& geo)
|
|||||||
}
|
}
|
||||||
|
|
||||||
d->geometry = geo;
|
d->geometry = geo;
|
||||||
|
|
||||||
startAnimation();
|
startAnimation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,8 @@ class Layout::Private
|
|||||||
bottomMargin(12.0),
|
bottomMargin(12.0),
|
||||||
spacing(6.0),
|
spacing(6.0),
|
||||||
parent(p),
|
parent(p),
|
||||||
animator(0)
|
animator(0),
|
||||||
|
relayouting(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,6 +57,8 @@ class Layout::Private
|
|||||||
|
|
||||||
LayoutItem *parent;
|
LayoutItem *parent;
|
||||||
LayoutAnimator *animator;
|
LayoutAnimator *animator;
|
||||||
|
|
||||||
|
bool relayouting;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -92,6 +95,11 @@ void Layout::update()
|
|||||||
|
|
||||||
void Layout::invalidate()
|
void Layout::invalidate()
|
||||||
{
|
{
|
||||||
|
if (d->relayouting()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
d->relayouting = true;
|
||||||
// find and update the top level layout
|
// find and update the top level layout
|
||||||
Layout *layout = this;
|
Layout *layout = this;
|
||||||
Layout *parentLayout = 0;
|
Layout *parentLayout = 0;
|
||||||
@ -104,6 +112,7 @@ void Layout::invalidate()
|
|||||||
} while (parentLayout);
|
} while (parentLayout);
|
||||||
|
|
||||||
layout->update();
|
layout->update();
|
||||||
|
d->relayouting = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user