From 29cdbc18fe0bed887c1c0192bd539802b39cf01b Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Fri, 9 Sep 2011 15:03:01 +0200 Subject: Make QSGItem::update() work when called from inside QSGCanvasPlainRenderLoop::paint() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If update was called in a function triggered by rendering, it would set the dirty flag without posting an update event. Subsequent render calls would just return without doing anything because the dirty flag was set. This could cause the applications UI to freeze up. Change-Id: Ib50403c1d9e22cc4680379f0c90fb2fcaa29c1d6 Reviewed-on: http://codereview.qt-project.org/4550 Reviewed-by: Samuel Rødal --- src/declarative/items/qsgcanvas.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/declarative/items/qsgcanvas.cpp b/src/declarative/items/qsgcanvas.cpp index b89a642e58..2f663681ae 100644 --- a/src/declarative/items/qsgcanvas.cpp +++ b/src/declarative/items/qsgcanvas.cpp @@ -91,6 +91,7 @@ public: } virtual void paint() { + updatePending = false; if (animationRunning && animationDriver()) animationDriver()->advance(); polishItems(); @@ -99,7 +100,6 @@ public: glViewport(0, 0, size.width(), size.height()); renderSceneGraph(size); swapBuffers(); - updatePending = false; if (animationRunning) maybeUpdate(); -- cgit v1.2.3