summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2014-02-05 13:54:50 +0200
committerTomi Korpipää <tomi.korpipaa@digia.com>2014-02-06 06:20:06 +0200
commit427e7f5f5c62f728e159462dd28ae1ef76761d75 (patch)
tree93bdcfb5fd105812c5ce0d302e6c0b21d88bfe61 /src
parent83611a966a77e5962adfcebe75f5aca49fc5971e (diff)
Don't draw the graph in qml when it is set not visible.
Task-number: QTRD-2859 Change-Id: I4be7faf4fe9f5027811d4f9ca5f541f6634d41ec Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/datavisualizationqml2/abstractdeclarative.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/datavisualizationqml2/abstractdeclarative.cpp b/src/datavisualizationqml2/abstractdeclarative.cpp
index 98792fd0..2dc600c2 100644
--- a/src/datavisualizationqml2/abstractdeclarative.cpp
+++ b/src/datavisualizationqml2/abstractdeclarative.cpp
@@ -214,16 +214,18 @@ void AbstractDeclarative::render()
glClear(GL_COLOR_BUFFER_BIT);
}
- glDepthMask(GL_TRUE);
- glEnable(GL_DEPTH_TEST);
- glDepthFunc(GL_LESS);
- glEnable(GL_CULL_FACE);
- glCullFace(GL_BACK);
- glDisable(GL_BLEND);
+ if (isVisible()) {
+ glDepthMask(GL_TRUE);
+ glEnable(GL_DEPTH_TEST);
+ glDepthFunc(GL_LESS);
+ glEnable(GL_CULL_FACE);
+ glCullFace(GL_BACK);
+ glDisable(GL_BLEND);
- m_controller->render();
+ m_controller->render();
- glEnable(GL_BLEND);
+ glEnable(GL_BLEND);
+ }
}
QAbstract3DInputHandler* AbstractDeclarative::inputHandler() const