From 6ca81fdddb5a2de8542b56089d7a9f99d6c06998 Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Sat, 17 Jul 2021 18:25:06 +0800 Subject: [PATCH] Revert "restore opts['viewport'] after clobbering" This reverts commit 7a17cda956f0789637a5885aa551d878e1d346f9. --- pyqtgraph/opengl/GLViewWidget.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyqtgraph/opengl/GLViewWidget.py b/pyqtgraph/opengl/GLViewWidget.py index 40f700d7..f931fd72 100644 --- a/pyqtgraph/opengl/GLViewWidget.py +++ b/pyqtgraph/opengl/GLViewWidget.py @@ -550,7 +550,6 @@ class GLViewWidget(QtWidgets.QOpenGLWidget): glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT, texwidth, texwidth) glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, depth_buf) - viewport_orig = self.opts['viewport'] self.opts['viewport'] = (0, 0, w, h) # viewport is the complete image; this ensures that paintGL(region=...) # is interpreted correctly. p2 = 2 * padding @@ -573,7 +572,7 @@ class GLViewWidget(QtWidgets.QOpenGLWidget): output[x+padding:x2-padding, y+padding:y2-padding] = data[padding:w2-padding, -(h2-padding):-padding] finally: - self.opts['viewport'] = viewport_orig + self.opts['viewport'] = None glfbo.glBindFramebuffer(glfbo.GL_FRAMEBUFFER, 0) glBindTexture(GL_TEXTURE_2D, 0) if tex is not None: