Fixed crash
This commit is contained in:
@@ -2,9 +2,6 @@ from PyQt5.QtCore import QTimer
|
||||
from PyQt5.QtWidgets import QOpenGLWidget
|
||||
from OpenGL.GL import *
|
||||
from OpenGL.GLU import *
|
||||
from editortool.map.selectbox import SelectBox
|
||||
from editortool.map.camera import Camera
|
||||
from editortool.map.grid import Grid
|
||||
|
||||
class GLWidget(QOpenGLWidget):
|
||||
def __init__(self, parent):
|
||||
@@ -13,9 +10,6 @@ class GLWidget(QOpenGLWidget):
|
||||
self.timer = QTimer(self)
|
||||
self.timer.timeout.connect(self.update)
|
||||
self.timer.start(16) # ~60 FPS
|
||||
self.camera = Camera(self)
|
||||
self.grid = Grid()
|
||||
self.selectBox = SelectBox(self)
|
||||
|
||||
def initializeGL(self):
|
||||
glClearColor(0.392, 0.584, 0.929, 1.0)
|
||||
@@ -36,7 +30,6 @@ class GLWidget(QOpenGLWidget):
|
||||
w = 1
|
||||
|
||||
glViewport(0, 0, w, h)
|
||||
self.camera.setup(w, h)
|
||||
|
||||
self.grid.draw()
|
||||
self.selectBox.draw()
|
||||
self.parent.camera.setup(w, h)
|
||||
self.parent.grid.draw()
|
||||
self.parent.selectBox.draw()
|
||||
Reference in New Issue
Block a user