Skip to content

Commit 5094f5c

Browse files
committed
qtvcp -macroTab: fix skipped variables with checkbuttons
check and buttons were not processed to convert the state to an integer.
1 parent 07cee88 commit 5094f5c

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

lib/python/qtvcp/widgets/macro_widget.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
# Set the log level for this module
3939
if not INFO.LINUXCNC_IS_RUNNING:
4040
LOG.setLevel(logger.DEBUG) # One of DEBUG, INFO, WARNING, ERROR, CRITICAL
41-
LOG.setLevel(logger.DEBUG)
4241
try:
4342
from PyQt5 import QtSvg
4443
except:
@@ -236,6 +235,7 @@ def checkIfFloat(val):
236235
# add labels and edits
237236
# self[tName][0] is the list of name text and defaults pairs
238237
for n, name in enumerate(self[tName][0]):
238+
LOG.verbose('{} {}'.format(tName, name))
239239
#print('int------>',self[tName])
240240
# if no list of names then continue looking
241241
if name[0]=='':continue
@@ -485,9 +485,11 @@ def runMacro(self):
485485
for num, i in enumerate(self[name][0]):
486486
# check for macro that needs no data
487487
if i == ('', ''):break
488-
# Look for a radio button instance so we can convert to integers
488+
# Look for button widget instance so we can convert to integers
489489
# other wise we assume text
490-
if isinstance(self['%s%d' % (name, num)], QtWidgets.QRadioButton):
490+
if isinstance(self['%s%d' % (name, num)], QtWidgets.QRadioButton) or \
491+
isinstance(self['%s%d' % (name, num)], QtWidgets.QCheckBox) or \
492+
isinstance(self['%s%d' % (name, num)], QtWidgets.QPushButton):
491493
data = str(1 * int(self['%s%d' % (name, num)].isChecked()))
492494
else:
493495
data = str(self['%s%d' % (name, num)].text())

0 commit comments

Comments
 (0)