diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-07-16 04:58:42 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-07-16 04:58:42 (GMT) |
commit | f60dea8315fef502f6f4c6941455a51bee66efd9 (patch) | |
tree | c30997aa1c6e30988b3b41336d55eb3af55237fc /src/declarative/fx/qfxanchors.cpp | |
parent | c4fde5ba0d43482973db964727b9d48a9c2f9f06 (diff) | |
download | Qt-f60dea8315fef502f6f4c6941455a51bee66efd9.zip Qt-f60dea8315fef502f6f4c6941455a51bee66efd9.tar.gz Qt-f60dea8315fef502f6f4c6941455a51bee66efd9.tar.bz2 |
Reset fill and centeredIn when they are set to a null pointer.
Diffstat (limited to 'src/declarative/fx/qfxanchors.cpp')
-rw-r--r-- | src/declarative/fx/qfxanchors.cpp | 10 |
1 files 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; |