Skip to content

Commit 1d3e35c

Browse files
committed
Gmoccapy Toolpage: Change touchoff function to new selection method
1 parent e1640ca commit 1d3e35c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/emc/usr_intf/gmoccapy/gmoccapy.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5458,13 +5458,14 @@ def on_btn_save_tool_changes_clicked(self, widget, data=None):
54585458
self.widgets.tooledit1.set_selected_tool(self.stat.tool_in_spindle)
54595459

54605460
def on_btn_tool_touchoff_clicked(self, widget, data=None):
5461-
if not self.widgets.tooledit1.get_selected_tool():
5462-
message = _("No or multiple tools selected in the tool table. ")
5461+
tool = self.widgets.tooledit1.get_selected_row()
5462+
if not tool:
5463+
message = _("No tool selected in the tool table. ")
54635464
message += _("Please select only one tool in the table!")
54645465
self.dialogs.warning_dialog(self, _("Warning Tool Touch off not possible!"), message)
54655466
return
54665467

5467-
if self.widgets.tooledit1.get_selected_tool() != self.stat.tool_in_spindle:
5468+
if tool != self.stat.tool_in_spindle:
54685469
message = _("You can not touch off a tool, which is not mounted in the spindle! ")
54695470
message += _("Your selection has been reset to the tool in spindle.")
54705471
self.dialogs.warning_dialog(self, _("Warning Tool Touch off not possible!"), message)

0 commit comments

Comments
 (0)