summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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