From f60dea8315fef502f6f4c6941455a51bee66efd9 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Thu, 16 Jul 2009 14:58:42 +1000 Subject: Reset fill and centeredIn when they are set to a null pointer. --- src/declarative/fx/qfxanchors.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/declarative/fx/qfxanchors.cpp b/src/declarative/fx/qfxanchors.cpp index 3cfa02f..e1b450d 100644 --- a/src/declarative/fx/qfxanchors.cpp +++ b/src/declarative/fx/qfxanchors.cpp @@ -324,8 +324,11 @@ QFxItem *QFxAnchors::fill() const void QFxAnchors::setFill(QFxItem *f) { Q_D(QFxAnchors); - if (!f) + if (!f) { + d->remDepend(d->fill); + d->fill = f; return; + } if (f != d->item->itemParent() && f->itemParent() != d->item->itemParent()){ qmlInfo(d->item) << "Can't anchor to an item that isn't a parent or sibling."; return; @@ -353,8 +356,11 @@ QFxItem *QFxAnchors::centeredIn() const void QFxAnchors::setCenteredIn(QFxItem* c) { Q_D(QFxAnchors); - if (!c) + if (!c) { + d->remDepend(d->centeredIn); + d->centeredIn = c; return; + } if (c != d->item->itemParent() && c->itemParent() != d->item->itemParent()){ qmlInfo(d->item) << "Can't anchor to an item that isn't a parent or sibling."; return; -- cgit v0.12