From: daid Date: Mon, 24 Jun 2013 17:37:13 +0000 (+0200) Subject: Make the firmware update window act a bit better, use 24bit depth buffer in the super... X-Git-Tag: 13.06.4~9 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=0af27b3fbbd1b0cb03e4648f49574dcd760cce16;p=cura.git Make the firmware update window act a bit better, use 24bit depth buffer in the super-shaper --- diff --git a/Cura/gui/firmwareInstall.py b/Cura/gui/firmwareInstall.py index c64fcf6d..098c07eb 100644 --- a/Cura/gui/firmwareInstall.py +++ b/Cura/gui/firmwareInstall.py @@ -42,7 +42,7 @@ class InstallFirmware(wx.Dialog): sizer = wx.BoxSizer(wx.VERTICAL) - self.progressLabel = wx.StaticText(self, -1, 'Reading firmware...') + self.progressLabel = wx.StaticText(self, -1, 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\nX') sizer.Add(self.progressLabel, 0, flag=wx.ALIGN_CENTER) self.progressGauge = wx.Gauge(self, -1) sizer.Add(self.progressGauge, 0, flag=wx.EXPAND) @@ -54,7 +54,10 @@ class InstallFirmware(wx.Dialog): self.filename = filename self.port = port - + + self.Layout() + self.Fit() + threading.Thread(target=self.OnRun).start() self.ShowModal() @@ -62,6 +65,7 @@ class InstallFirmware(wx.Dialog): return def OnRun(self): + wx.CallAfter(self.updateLabel, "Reading firmware...") hexFile = intelHex.readHex(self.filename) wx.CallAfter(self.updateLabel, "Connecting to machine...") programmer = stk500v2.Stk500v2() @@ -95,8 +99,8 @@ class InstallFirmware(wx.Dialog): def updateLabel(self, text): self.progressLabel.SetLabel(text) - self.Layout() - + #self.Layout() + def OnProgress(self, value, max): wx.CallAfter(self.progressGauge.SetRange, max) wx.CallAfter(self.progressGauge.SetValue, value) diff --git a/Cura/gui/tools/superformula.py b/Cura/gui/tools/superformula.py index 12556bde..051cc6d5 100644 --- a/Cura/gui/tools/superformula.py +++ b/Cura/gui/tools/superformula.py @@ -101,7 +101,7 @@ class superformulaEvolver(wx.Frame): sizer = wx.BoxSizer() self.SetSizer(sizer) - attribList = (glcanvas.WX_GL_RGBA, glcanvas.WX_GL_DOUBLEBUFFER, glcanvas.WX_GL_DEPTH_SIZE, 32, glcanvas.WX_GL_STENCIL_SIZE, 8) + attribList = (glcanvas.WX_GL_RGBA, glcanvas.WX_GL_DOUBLEBUFFER, glcanvas.WX_GL_DEPTH_SIZE, 24, glcanvas.WX_GL_STENCIL_SIZE, 8) self._glCanvas = glcanvas.GLCanvas(self, style=wx.WANTS_CHARS, attribList = attribList) self._glCanvas.SetMinSize((800,600)) sizer.Add(self._glCanvas, 1, flag=wx.EXPAND)