From c72eaee91136bbe1a9fa99cdb0a7593bec60264b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Mon, 14 Sep 2009 15:00:39 +0200 Subject: Fixed clipping bug in portedcanvas with -graphicssystem opengl We need to call ensureActive() when save() is called, to make sure systemStateChanged() gets called and updates the scissorTestEnabled flag, so that we don't lose it on the next restore(). Task-number: 261113 Reviewed-by: Trond --- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index ea5bec8..bbb285f 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1720,6 +1720,9 @@ QPainterState *QGL2PaintEngineEx::createState(QPainterState *orig) const { Q_D(const QGL2PaintEngineEx); + if (orig) + const_cast(this)->syncState(); + QOpenGL2PaintEngineState *s; if (!orig) s = new QOpenGL2PaintEngineState(); -- cgit v0.12