Commit 91312466 authored by Kliment Yanev's avatar Kliment Yanev

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

parents ed4cf4a0 36a2034a
...@@ -47,13 +47,21 @@ class window(wx.Frame): ...@@ -47,13 +47,21 @@ class window(wx.Frame):
else: else:
event.Skip() event.Skip()
def key(self, event): def key(self, event):
x=event.GetKeyCode() x=event.GetKeyCode()
#print x if event.ShiftDown():
cx,cy=self.p.translate
if x==wx.WXK_UP:
self.p.zoom(cx,cy,1.2)
if x==wx.WXK_DOWN:
self.p.zoom(cx,cy,1/1.2)
else:
if x==wx.WXK_UP: if x==wx.WXK_UP:
self.p.layerup() self.p.layerup()
if x==wx.WXK_DOWN: if x==wx.WXK_DOWN:
self.p.layerdown() self.p.layerdown()
#print x
#print p.lines.keys() #print p.lines.keys()
def zoom(self, event): def zoom(self, event):
......
...@@ -1161,7 +1161,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole): ...@@ -1161,7 +1161,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
string+=_("Loaded ")+os.path.split(self.filename)[1]+" " string+=_("Loaded ")+os.path.split(self.filename)[1]+" "
except: except:
pass pass
string+=(self.tempreport.replace("\r","").replace("T",_("Hotend")).replace("B",_("Bed")).replace("\n","").replace("ok ",""))+" " string+=(self.tempreport.replace("\r","").replace("T:",_("Hotend") + ":").replace("B:",_("Bed") + ":").replace("\n","").replace("ok ",""))+" "
wx.CallAfter(self.tempdisp.SetLabel,self.tempreport.strip().replace("ok ","")) wx.CallAfter(self.tempdisp.SetLabel,self.tempreport.strip().replace("ok ",""))
try: try:
self.hottgauge.SetValue(float(filter(lambda x:x.startswith("T:"),self.tempreport.split())[0].split(":")[1])) self.hottgauge.SetValue(float(filter(lambda x:x.startswith("T:"),self.tempreport.split())[0].split(":")[1]))
...@@ -1557,11 +1557,11 @@ class PronterWindow(wx.Frame,pronsole.pronsole): ...@@ -1557,11 +1557,11 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
dlg=wx.MessageDialog(self, _("Are you sure you want to reset the printer?"), _("Reset?"), wx.YES|wx.NO) dlg=wx.MessageDialog(self, _("Are you sure you want to reset the printer?"), _("Reset?"), wx.YES|wx.NO)
if dlg.ShowModal()==wx.ID_YES: if dlg.ShowModal()==wx.ID_YES:
self.p.reset() self.p.reset()
self.p.printing=0
wx.CallAfter(self.printbtn.SetLabel, _("Print"))
if self.paused: if self.paused:
self.p.paused=0 self.p.paused=0
self.p.printing=0
wx.CallAfter(self.pausebtn.SetLabel, _("Pause")) wx.CallAfter(self.pausebtn.SetLabel, _("Pause"))
wx.CallAfter(self.printbtn.SetLabel, _("Print"))
self.paused=0 self.paused=0
def get_build_dimensions(self,bdim): def get_build_dimensions(self,bdim):
......
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