From f48d5dd7554edef5ac3fa11ebd86eaa52a8e23b6 Mon Sep 17 00:00:00 2001 From: "Eduardo M. Fleury" Date: Thu, 23 Jul 2009 19:59:05 -0300 Subject: 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 Reviewed-by: Caio Marcelo de Oliveira Filho --- src/gui/graphicsview/qgraphicsanchorlayout.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/gui/graphicsview/qgraphicsanchorlayout.cpp') 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(); } -- cgit v1.2.1