summaryrefslogtreecommitdiff
path: root/src/gui/graphicsview/qgraphicsanchorlayout.cpp
diff options
context:
space:
mode:
authorEduardo M. Fleury <eduardo.fleury@openbossa.org>2009-07-23 19:59:05 -0300
committerEduardo M. Fleury <eduardo.fleury@openbossa.org>2009-08-06 19:47:31 -0300
commitf48d5dd7554edef5ac3fa11ebd86eaa52a8e23b6 (patch)
tree133df0421d5c5cdfd332bcdec99917a6582c0dda /src/gui/graphicsview/qgraphicsanchorlayout.cpp
parentaa05ec20ee0961f129eb66527892360c17dc3a18 (diff)
downloadqt4-tools-f48d5dd7554edef5ac3fa11ebd86eaa52a8e23b6.tar.gz
QGraphicsAnchorLayout: Fix center anchor deletion logic
We were missing a call to "removeCenterAnchors" in the "removeAnchors" method. To solve that, and also reduce the number of useless calls to that method, this commit: 1) Calls it only from "removeInternalVertex" 2) Does some preliminary testing before calling it 3) Replace the former test inside "removeCenterAnchors" by a Q_ASSERT It also adds other Q_ASSERTs to protect us from regression bugs. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Diffstat (limited to 'src/gui/graphicsview/qgraphicsanchorlayout.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp
index fe335e8361..6360e7513b 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp
+++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp
@@ -200,9 +200,6 @@ void QGraphicsAnchorLayout::removeAnchor(QGraphicsLayoutItem *firstItem, Edge fi
}
d->removeAnchor(firstItem, firstEdge, secondItem, secondEdge);
- d->removeCenterAnchors(firstItem, firstEdge);
- d->removeCenterAnchors(secondItem, secondEdge);
-
invalidate();
}