Commit 63aad039 authored by Guillaume Seguin's avatar Guillaume Seguin

Fix #544

parent aac2b605
...@@ -440,8 +440,9 @@ class GcodeViewFrame(GvizBaseFrame, GcodeViewLoader): ...@@ -440,8 +440,9 @@ class GcodeViewFrame(GvizBaseFrame, GcodeViewLoader):
layer = self.model.num_layers_to_draw layer = self.model.num_layers_to_draw
filtered = [k for k, v in self.model.layer_idxs_map.iteritems() if v == layer] filtered = [k for k, v in self.model.layer_idxs_map.iteritems() if v == layer]
if filtered: if filtered:
z = filtered[0] true_layer = filtered[0]
message = _("Layer %d -%s Z = %.03f mm") % (layer + 1, extra, z) z = self.model.gcode.all_layers[true_layer].z
message = _("Layer %d -%s Z = %.03f mm") % (layer, extra, z)
else: else:
message = _("Entire object") message = _("Entire object")
wx.CallAfter(self.SetStatusText, message, 0) wx.CallAfter(self.SetStatusText, message, 0)
...@@ -472,6 +473,7 @@ class GcodeViewFrame(GvizBaseFrame, GcodeViewLoader): ...@@ -472,6 +473,7 @@ class GcodeViewFrame(GvizBaseFrame, GcodeViewLoader):
GcodeViewLoader.addfile(self, gcode) GcodeViewLoader.addfile(self, gcode)
self.layerslider.SetRange(1, self.model.max_layers + 1) self.layerslider.SetRange(1, self.model.max_layers + 1)
self.layerslider.SetValue(self.model.max_layers + 1) self.layerslider.SetValue(self.model.max_layers + 1)
wx.CallAfter(self.SetStatusText, _("Entire object"), 0)
wx.CallAfter(self.Refresh) wx.CallAfter(self.Refresh)
def clear(self): def clear(self):
......
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