Skip to content

Commit 3753aa4

Browse files
committed
qtvcp -add tool comments information to manualtool change dialog
1 parent 2ab3127 commit 3753aa4

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lib/python/qtvcp/widgets/dialog_widget.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,20 @@
3030
from qtvcp.widgets.entry_widget import TouchInputWidget
3131
from qtvcp.widgets.calculator import Calculator
3232
from qtvcp.lib.notify import Notify
33-
from qtvcp.core import Status, Action, Info
33+
from qtvcp.core import Status, Action, Info, Tool
3434
from qtvcp import logger
3535

3636
# Instantiate the libraries with global reference
3737
# STATUS gives us status messages from linuxcnc
3838
# ACTION gives commands to linuxcnc
39-
# INFO holds INI dile details
39+
# INFO holds INI file details
40+
# TOOL gives tool file access
41+
# NOTICE is for the desktop notify system
4042
# LOG is for running code logging
4143
STATUS = Status()
4244
ACTION = Action()
4345
INFO = Info()
46+
TOOL = Tool()
4447
NOTICE = Notify()
4548
LOG = logger.getLogger(__name__)
4649

@@ -269,8 +272,10 @@ def showtooldialog(self, message, more_info=None, details=None, display_type=1,
269272
def tool_change(self, change):
270273
if change:
271274
MORE = 'Please Insert Tool %d' % self.tool_number.get()
275+
tool_table_line = TOOL.GET_TOOL_INFO(self.tool_number.get())
276+
comment = str(tool_table_line[TOOL.COMMENTS])
272277
MESS = 'Manual Tool Change Request'
273-
DETAILS = ' Tool Info:'
278+
DETAILS = ' Tool Info: %s'% comment
274279

275280
STATUS.emit('focus-overlay-changed', True, MESS, self._color)
276281
if self.speak:

0 commit comments

Comments
 (0)