Scene3D: Call update on the item not the window

On scene change QQuickWindow::update was called to ask the QQ2Renderer
to rerender the scene. The problem here is, that calling
QQuickWindow::update is percieved as a call to rerender under all
circumstances, while QQuickItem::update only means update if the scene
graph actually changed in the end. Using QQuickWindow::update the scene
will be rerendered even if the Scene3D item is invisible, using
QQuickItem::update it won't.

Change-Id: I1ff455628d3e536349683b064acaeadd354ec864
Fixes: QTBUG-72923
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit is contained in:
Anton Kreuzkamp 2019-03-21 11:19:58 +01:00 committed by Sean Harmer
parent 7a0d24164a
commit fa12f14b2b
1 changed files with 1 additions and 1 deletions

View File

@ -347,7 +347,7 @@ void Scene3DRenderer::render()
m_node->markDirty(QSGNode::DirtyMaterial);
// Request next frame
m_window->update();
m_item->update();
}
} // namespace Qt3DRender