修复打印时没有修改z偏移值 仍提示保存z偏移的按钮的bug

This commit is contained in:
张开科 2024-12-10 14:34:13 +08:00
parent 594fb668fe
commit e3fd413d62

View File

@ -739,9 +739,10 @@ class Panel(ScreenPanel):
self.enable_button("resume", "cancel")
self.can_close = False
else:
active_extruder = self._printer.get_stat("toolhead", "extruder")
offset = self._printer.get_stat("gcode_move", "homing_origin")
self.zoffset = float(offset[2]) if offset else 0
if self.zoffset != 0:
if self.zoffset != 0 and active_extruder == "extruder":
if "Z_OFFSET_APPLY_ENDSTOP" in self._printer.available_commands:
self.buttons['button_grid'].attach(self.buttons["save_offset_endstop"], 0, 0, 1, 1)
else: