Commit 5d559db6 authored by Guillaume Seguin's avatar Guillaume Seguin

Merge branch 'experimental' of github.com:kliment/Printrun into experimental

Conflicts:
	pronterface.py
parents 2d3a356e 7ee7e1d9
...@@ -132,6 +132,9 @@ class wxGLPanel(wx.Panel): ...@@ -132,6 +132,9 @@ class wxGLPanel(wx.Panel):
def OnReshape(self, width, height): def OnReshape(self, width, height):
'''Reshape the OpenGL viewport based on the dimensions of the window.''' '''Reshape the OpenGL viewport based on the dimensions of the window.'''
if not self.GLinitialized:
self.GLinitialized = True
self.OnInitGL()
glViewport(0, 0, width, height) glViewport(0, 0, width, height)
glMatrixMode(GL_PROJECTION) glMatrixMode(GL_PROJECTION)
glLoadIdentity() glLoadIdentity()
......
...@@ -1344,6 +1344,7 @@ class PronterWindow(MainWindow, pronsole.pronsole): ...@@ -1344,6 +1344,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
wx.CallAfter(self.printbtn.Enable) wx.CallAfter(self.printbtn.Enable)
wx.CallAfter(self.status.SetStatusText, _("Loaded %s, %d lines") % (self.filename, len(self.fgcode),)) wx.CallAfter(self.status.SetStatusText, _("Loaded %s, %d lines") % (self.filename, len(self.fgcode),))
print _("Loaded %s, %d lines") % (self.filename, len(self.fgcode),)
wx.CallAfter(self.pausebtn.Disable) wx.CallAfter(self.pausebtn.Disable)
wx.CallAfter(self.printbtn.SetLabel, _("Print")) wx.CallAfter(self.printbtn.SetLabel, _("Print"))
...@@ -1406,6 +1407,7 @@ class PronterWindow(MainWindow, pronsole.pronsole): ...@@ -1406,6 +1407,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
self.filename = name self.filename = name
self.fgcode = gcoder.GCode(open(self.filename)) self.fgcode = gcoder.GCode(open(self.filename))
self.status.SetStatusText(_("Loaded %s, %d lines") % (name, len(self.fgcode))) self.status.SetStatusText(_("Loaded %s, %d lines") % (name, len(self.fgcode)))
print _("Loaded %s, %d lines") % (name, len(self.fgcode))
wx.CallAfter(self.printbtn.SetLabel, _("Print")) wx.CallAfter(self.printbtn.SetLabel, _("Print"))
wx.CallAfter(self.pausebtn.SetLabel, _("Pause")) wx.CallAfter(self.pausebtn.SetLabel, _("Pause"))
wx.CallAfter(self.pausebtn.Disable) wx.CallAfter(self.pausebtn.Disable)
......
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