summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJesus Sanchez-Palencia <jesus.palencia@openbossa.org>2009-09-17 20:42:26 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2009-09-25 10:49:19 (GMT)
commit44522ab013d4c1157a3b1ed4df28060ad49b5b24 (patch)
treef8268c59ef160b6cefbecbef9fa12fbab55c3858 /src
parentce98cf421d30d09392498518731bdcc50e191583 (diff)
downloadQt-44522ab013d4c1157a3b1ed4df28060ad49b5b24.zip
Qt-44522ab013d4c1157a3b1ed4df28060ad49b5b24.tar.gz
Qt-44522ab013d4c1157a3b1ed4df28060ad49b5b24.tar.bz2
QGraphicsAnchorLayoutPrivate: Avoiding graph simplification on empty layouts
Signed-off-by: Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
Diffstat (limited to 'src')
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout_p.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
index 7041d58..49aabf5 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
+++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
@@ -542,7 +542,7 @@ static bool simplifySequentialChunk(Graph<AnchorVertex, AnchorData> *graph,
void QGraphicsAnchorLayoutPrivate::simplifyGraph(Orientation orientation)
{
static bool noSimplification = !qgetenv("QT_ANCHORLAYOUT_NO_SIMPLIFICATION").isEmpty();
- if (noSimplification)
+ if (noSimplification || items.isEmpty())
return;
if (graphSimplified[orientation])