Skip to content

Commit 29e2973

Browse files
committed
qtdragon -add status control of toolchange dialog
so you can use halui to accept the toolchange
1 parent 46df48b commit 29e2973

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

share/qtvcp/screens/qtdragon/qtdragon_handler.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,7 @@ def lastRunLine(self, line):
901901

902902
# called from hal_glib to run macros from external event
903903
def request_macro_call(self, data):
904+
print('macro request:',data)
904905
if not STATUS.is_mdi_mode():
905906
self.add_status(_translate("HandlerClass",'Machine must be in MDI mode to run macros'), CRITICAL)
906907
return
@@ -925,6 +926,8 @@ def request_macro_call(self, data):
925926
self.add_status(_translate("HandlerClass",'Running macro: {} {}'.format(key, text)))
926927
button.click()
927928
break
929+
else:
930+
self.add_status(_translate("HandlerClass","can't find button for macro: {}".format(data)))
928931

929932
#######################
930933
# CALLBACKS FROM FORM #
@@ -2084,9 +2087,14 @@ def external_mpg(self, count):
20842087

20852088
def dialog_ext_control(self, pin, value, answer):
20862089
if value:
2090+
# handler defined dialog?
20872091
if not self._dialog_message is None:
20882092
name = self._dialog_message.get('NAME')
20892093
STATUS.emit('dialog-update',{'NAME':name,'response':answer})
2094+
else:
2095+
# tool change dialog?
2096+
if self.w.toolDialog_.isVisible():
2097+
STATUS.emit('dialog-update',{'NAME':'TOOLCHANGE','response':answer})
20902098

20912099
def log_version(self):
20922100
if INFO.RIP_FLAG:

0 commit comments

Comments
 (0)