Skip to content

Commit 77c7740

Browse files
committed
qtplasmac: add translation for tool type
1 parent 8df60c0 commit 77c7740

3 files changed

Lines changed: 23 additions & 7 deletions

File tree

share/qtvcp/screens/qtplasmac/qtplasmac_handler.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = '237.306'
1+
VERSION = '237.307'
22
LCNCVER = '2.9'
33
DOCSVER = LCNCVER
44

@@ -322,6 +322,11 @@ def __init__(self, halcomp, widgets, paths):
322322
# jog stack indexes
323323
self.JOG = 0
324324
self.CUT_RECOVERY = 1
325+
# tool indexes
326+
self.TORCH = 0
327+
self.SCRIBE = 1
328+
self.UNKNOWN = 2
329+
self.tool = self.TORCH
325330

326331
# called by qtvcp.py
327332
def initialized__(self):
@@ -1707,11 +1712,17 @@ def override_jog_changed(self, state):
17071712

17081713
def tool_changed(self, obj, tool):
17091714
if tool == 0:
1710-
self.w.lbl_tool.setText('TORCH')
1715+
self.tool = self.TORCH
1716+
text = _translate('HandlerClass', 'TORCH')
1717+
self.w.lbl_tool.setText(text)
17111718
elif tool == 1:
1712-
self.w.lbl_tool.setText('SCRIBE')
1719+
self.tool = self.SCRIBE
1720+
text = _translate('HandlerClass', 'SCRIBE')
1721+
self.w.lbl_tool.setText(text)
17131722
else:
1714-
self.w.lbl_tool.setText('UNKNOWN')
1723+
self.tool = self.UNKNOWN
1724+
text = _translate('HandlerClass', 'UNKNOWN')
1725+
self.w.lbl_tool.setText(text)
17151726

17161727
def gcodes_changed(self, obj, cod):
17171728
if self.units == 'in' and STATUS.is_metric_mode():
@@ -2143,7 +2154,7 @@ def file_clear_clicked(self):
21432154
self.remove_temp_materials()
21442155
ACTION.OPEN_PROGRAM(clearFile)
21452156
ACTION.prefilter_path = self.preClearFile
2146-
if self.w.lbl_tool.text() != 'TORCH' and STATUS.is_on_and_idle() and STATUS.is_all_homed():
2157+
if self.tool != self.TORCH and STATUS.is_on_and_idle() and STATUS.is_all_homed():
21472158
ACTION.CALL_MDI_WAIT('T0 M6')
21482159
ACTION.CALL_MDI_WAIT('G43 H0')
21492160
ACTION.SET_MANUAL_MODE()

share/qtvcp/screens/qtplasmac/versions.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ <h2>QtPlasmaC Version History - LinuxCNC 2.9</h2>
2626
</table>
2727
<br>
2828
<!--- ****** ADD NEXT VERSION BELOW THIS LINE ****** --->
29-
<br><b><u>237.305 2024 Feb 25</u></b>
29+
<br><b><u>237.307 2024 Feb 25</u></b>
30+
<ul style="margin:0;">
31+
<li>add translation for tool type</li>
32+
</ul>
33+
34+
<br><b><u>237.306 2024 Feb 25</u></b>
3035
<ul style="margin:0;">
3136
<li>fix gcode filter spotting coordinates when overburn is active</li>
3237
</ul>

src/emc/usr_intf/qtplasmac/qtplasmac_gcode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ def fix_overburn_incremental_coordinates(self, data):
934934
x = self.get_axis_value(data, 'X')
935935
if x is not None:
936936
newData += f'X{x - self.oBurnX:0.4f}'
937-
y = self.get_axis_value(data, 'y')
937+
y = self.get_axis_value(data, 'Y')
938938
if y is not None:
939939
newData += f'Y{y - self.oBurnY:0.4f}'
940940
return newData

0 commit comments

Comments
 (0)