summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-10-22 01:57:01 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-10-22 01:57:01 (GMT)
commit2391cf5d127882ce8811e058115d5c2605328079 (patch)
treef72dff97d21074e3e546b27ec2418f02d7e3a934 /src/declarative/fx
parent6c65d5af83fb2a8c6fbd33c0d00723234cfc9f03 (diff)
downloadQt-2391cf5d127882ce8811e058115d5c2605328079.zip
Qt-2391cf5d127882ce8811e058115d5c2605328079.tar.gz
Qt-2391cf5d127882ce8811e058115d5c2605328079.tar.bz2
Fix anchor dependancy tracking.
Diffstat (limited to 'src/declarative/fx')
-rw-r--r--src/declarative/fx/qfxanchors.cpp8
1 files changed, 7 insertions, 1 deletions
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<QFxItemPrivate *>(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<QFxItemPrivate *>(QGraphicsItemPrivate::get(item));
- p->dependantAnchors.removeAll(q);
+ p->dependantAnchors.removeOne(q);
}
bool QFxAnchorsPrivate::isItemComplete() const