Skip to content

Commit 9ffe625

Browse files
authored
Merge pull request #3729 from Sigma1912: Gmoccapy: Change touchoff function to new selection method + update docs
Gmoccapy: Change touchoff function to new selection method + update docs
2 parents 92e1fd2 + 1d3e35c commit 9ffe625

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

docs/src/gui/gmoccapy.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -619,10 +619,10 @@ m|gmoccapy.h-button.button-9 | open HAL show | back | back
619619
[cols="10,10,10,10", options="header"]
620620
|===
621621
| Pin | Tool Mode | Edit Mode | Select File
622-
m|gmoccapy.h-button.button-0 | delete tool(s) | | go to home directory
623-
m|gmoccapy.h-button.button-1 | new tool | reload file | one directory level up
624-
m|gmoccapy.h-button.button-2 | reload tool table | save |
625-
m|gmoccapy.h-button.button-3 | apply changes | save as | move selection left
622+
m|gmoccapy.h-button.button-0 | | | go to home directory
623+
m|gmoccapy.h-button.button-1 | | reload file | one directory level up
624+
m|gmoccapy.h-button.button-2 | | save |
625+
m|gmoccapy.h-button.button-3 | | save as | move selection left
626626
m|gmoccapy.h-button.button-4 | change tool by number T? M6 | | move selection right
627627
m|gmoccapy.h-button.button-5 | set tool by number without change M61 Q? | | jump to directory as set in settings
628628
m|gmoccapy.h-button.button-6 | change tool to the selected one | new file |

src/emc/usr_intf/gmoccapy/gmoccapy.py

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

54745474
def on_btn_tool_touchoff_clicked(self, widget, data=None):
5475-
if not self.widgets.tooledit1.get_selected_tool():
5476-
message = _("No or multiple tools selected in the tool table. ")
5475+
tool = self.widgets.tooledit1.get_selected_row()
5476+
if not tool:
5477+
message = _("No tool selected in the tool table. ")
54775478
message += _("Please select only one tool in the table!")
54785479
self.dialogs.warning_dialog(self, _("Warning Tool Touch off not possible!"), message)
54795480
return
54805481

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

0 commit comments

Comments
 (0)