Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

revert planeviewer to inherit qglwidget

shun_iwasawa2bdc044b896d
diff --git a/toonz/sources/include/toonzqt/planeviewer.h b/toonz/sources/include/toonzqt/planeviewer.h
index cf6ac97f3..ad9896377 100644
--- a/toonz/sources/include/toonzqt/planeviewer.h
+++ b/toonz/sources/include/toonzqt/planeviewer.h
@@ -9,7 +9,7 @@
#include "timage.h"
// Qt includes
-#include <QOpenGLWidget>
+#include <QGLWidget>
#undef DVAPI
#undef DVVAR
@@ -51,7 +51,13 @@ class TVectorImageP;
efficient image-drawing functions for all Toonz image types.
*/
-class DVAPI PlaneViewer : public QOpenGLWidget {
+/*
+CAUTION : Changing PlaneViewer to inherit QOpenGLWidget causes crash bug with
+shader fx for some unknown reasons. So I will reluctantly keep using the
+obsolete class until the shader fx being overhauled. 2016/6/22 Shun
+*/
+
+class DVAPI PlaneViewer : public QGLWidget {
public:
PlaneViewer(QWidget *parent);
diff --git a/toonz/sources/toonzqt/planeviewer.cpp b/toonz/sources/toonzqt/planeviewer.cpp
index bda59e0fc..db31236d1 100644
--- a/toonz/sources/toonzqt/planeviewer.cpp
+++ b/toonz/sources/toonzqt/planeviewer.cpp
@@ -55,7 +55,7 @@ bool PlaneViewerZoomer::zoom(bool zoomin, bool resetZoom) {
//=========================================================================================
PlaneViewer::PlaneViewer(QWidget *parent)
- : QOpenGLWidget(parent)
+ : QGLWidget(parent)
, m_firstResize(true)
, m_xpos(0)
, m_ypos(0)
@@ -186,7 +186,7 @@ void PlaneViewer::wheelEvent(QWheelEvent *event) {
void PlaneViewer::keyPressEvent(QKeyEvent *event) {
if (PlaneViewerZoomer(this).exec(event)) return;
- QOpenGLWidget::keyPressEvent(event);
+ QGLWidget::keyPressEvent(event);
}
//------------------------------------------------------