Commit 768b7e25 authored by Guillaume Seguin's avatar Guillaume Seguin

Harden against #438

parent 079d0f3e
...@@ -100,7 +100,9 @@ class GvizWindow(GvizBaseFrame): ...@@ -100,7 +100,9 @@ class GvizWindow(GvizBaseFrame):
def process_slider(self, event): def process_slider(self, event):
self.p.layerindex = self.layerslider.GetValue() self.p.layerindex = self.layerslider.GetValue()
self.SetStatusText(_("Layer %d - Going Up - Z = %.03f mm") % (self.p.layerindex + 1, self.p.layers[self.p.layerindex]), 0) z = self.p.layers[self.p.layerindex]
z = 0. if z is None else z
self.SetStatusText(_("Layer %d - Going Up - Z = %.03f mm") % (self.p.layerindex + 1, z), 0)
self.p.dirty = 1 self.p.dirty = 1
wx.CallAfter(self.p.Refresh) wx.CallAfter(self.p.Refresh)
......
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