From 2391cf5d127882ce8811e058115d5c2605328079 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 22 Oct 2009 11:57:01 +1000 Subject: Fix anchor dependancy tracking. --- src/declarative/fx/qfxanchors.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/declarative/fx/qfxanchors.cpp b/src/declarative/fx/qfxanchors.cpp index 09776e5..085bbc7 100644 --- a/src/declarative/fx/qfxanchors.cpp +++ b/src/declarative/fx/qfxanchors.cpp @@ -181,6 +181,9 @@ void QFxAnchorsPrivate::centerInChanged() void QFxAnchorsPrivate::clearItem(QFxItem *item) { + Q_Q(QFxAnchors); + if (!item) + return; if (fill == item) fill = 0; if (centerIn == item) @@ -213,6 +216,9 @@ void QFxAnchorsPrivate::clearItem(QFxItem *item) baseline.item = 0; usedAnchors &= ~QFxAnchors::HasBaselineAnchor; } + QFxItemPrivate *p = + static_cast(QGraphicsItemPrivate::get(item)); + p->dependantAnchors.removeAll(q); } void QFxAnchorsPrivate::addDepend(QFxItem *item) @@ -232,7 +238,7 @@ void QFxAnchorsPrivate::remDepend(QFxItem *item) return; QFxItemPrivate *p = static_cast(QGraphicsItemPrivate::get(item)); - p->dependantAnchors.removeAll(q); + p->dependantAnchors.removeOne(q); } bool QFxAnchorsPrivate::isItemComplete() const -- cgit v0.12