Commit 727f9f0a authored by Guillaume Seguin's avatar Guillaume Seguin

Don't reset model view when resizing

parent b45c3c9d
...@@ -43,6 +43,7 @@ class wxGLPanel(wx.Panel): ...@@ -43,6 +43,7 @@ class wxGLPanel(wx.Panel):
super(wxGLPanel, self).__init__(parent, id, pos, size, style) super(wxGLPanel, self).__init__(parent, id, pos, size, style)
self.GLinitialized = False self.GLinitialized = False
self.mview_initialized = False
attribList = (glcanvas.WX_GL_RGBA, # RGBA attribList = (glcanvas.WX_GL_RGBA, # RGBA
glcanvas.WX_GL_DOUBLEBUFFER, # Double Buffered glcanvas.WX_GL_DOUBLEBUFFER, # Double Buffered
glcanvas.WX_GL_DEPTH_SIZE, 24) # 24 bit glcanvas.WX_GL_DEPTH_SIZE, 24) # 24 bit
...@@ -126,7 +127,9 @@ class wxGLPanel(wx.Panel): ...@@ -126,7 +127,9 @@ class wxGLPanel(wx.Panel):
else: else:
gluPerspective(60., float(width) / height, 10.0, 3 * self.dist) gluPerspective(60., float(width) / height, 10.0, 3 * self.dist)
if not self.mview_initialized:
self.reset_mview(0.9) self.reset_mview(0.9)
self.mview_initialized = True
# Wrap text to the width of the window # Wrap text to the width of the window
if self.GLinitialized: if self.GLinitialized:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment