summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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);
}
/*!