summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>2009-08-13 20:05:15 (GMT)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>2009-08-13 20:05:15 (GMT)
commitfd8c247f5fcf56c2dfe65c6dc88e6cc39ae1ea44 (patch)
tree91e2f00010ec6a8a33bb60b75aae04db58f5c952 /src/gui/graphicsview
parent834caef5e14358e019dc7a1e7dcbdd4f46eb14cd (diff)
downloadQt-fd8c247f5fcf56c2dfe65c6dc88e6cc39ae1ea44.zip
Qt-fd8c247f5fcf56c2dfe65c6dc88e6cc39ae1ea44.tar.gz
Qt-fd8c247f5fcf56c2dfe65c6dc88e6cc39ae1ea44.tar.bz2
QGraphicsAnchorLayout: enable simplification
Enable simplification by default. Allow disable during runtime by using the environment variable QT_ANCHORLAYOUT_NO_SIMPLIFICATION=1 when running the code. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout_p.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
index de14c31..09fe1b9 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
+++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
@@ -1127,7 +1127,9 @@ void QGraphicsAnchorLayoutPrivate::calculateGraphs(
// However, as the two setAnchorSizeHints methods above are not
// ready to be run on top of a simplified graph, we must simplify
// and restore it every time we get here.
- //simplifyGraph(orientation);
+ static bool simplification = qgetenv("QT_ANCHORLAYOUT_NO_SIMPLIFICATION").isEmpty();
+ if (simplification)
+ simplifyGraph(orientation);
// Traverse all graph edges and store the possible paths to each vertex
findPaths(orientation);
@@ -1256,6 +1258,9 @@ void QGraphicsAnchorLayoutPrivate::calculateGraphs(
qDeleteAll(constraints[orientation]);
constraints[orientation].clear();
graphPaths[orientation].clear(); // ###
+
+ if (simplification)
+ restoreSimplifiedGraph(orientation);
}
/*!