diff --git a/gviz.py b/gviz.py
index e919b71..9dcfa9b 100755
--- a/gviz.py
+++ b/gviz.py
@@ -12,13 +12,16 @@
#
# You should have received a copy of the GNU General Public License
# along with Printrun. If not, see .
-
import wx,time
+CurZ=0
+
class window(wx.Frame):
def __init__(self,f,size=(600,600),build_dimensions=[200,200,100,0,0,0],grid=(10,50),extrusion_width=0.5):
wx.Frame.__init__(self,None,title="Gcode view, shift to move view, mousewheel to set layer",size=(size[0],size[1]))
self.p=gviz(self,size=size,build_dimensions=build_dimensions,grid=grid,extrusion_width=extrusion_width)
+ self.CreateStatusBar(1);
+ self.SetStatusText("Layer number and Z position show here when you scroll");
s=time.time()
#print time.time()-s
self.initpos=[0,0]
@@ -76,6 +79,7 @@ class window(wx.Frame):
class gviz(wx.Panel):
def __init__(self,parent,size=(200,200),build_dimensions=[200,200,100,0,0,0],grid=(10,50),extrusion_width=0.5):
wx.Panel.__init__(self,parent,-1,size=(size[0],size[1]))
+ self.parent=parent
self.size=size
self.build_dimensions=build_dimensions
self.grid=grid
@@ -122,12 +126,18 @@ class gviz(wx.Panel):
def layerup(self):
if(self.layerindex+10):
self.layerindex-=1
+ self.parent.SetStatusText("Layer "+str(self.layerindex + 1)+" - Going Down - Z = "+str(self.layers[self.layerindex])+ " mm",0)
+
+ # self.parent.setstatustext("Layer = "+str(self.layerindex), 0)
self.repaint()
self.Refresh()
@@ -259,6 +269,7 @@ class gviz(wx.Panel):
target[1]=float(i[1:])
elif i[0]=="z":
target[2]=float(i[1:])
+ CurZ=target[2]
elif i[0]=="e":
target[3]=float(i[1:])
elif i[0]=="f":