Fix parametertree sending bad options to spinbox
This commit is contained in:
parent
6b798ffed8
commit
65e9052580
@ -279,9 +279,14 @@ class WidgetParameterItem(ParameterItem):
|
||||
|
||||
## If widget is a SpinBox, pass options straight through
|
||||
if isinstance(self.widget, SpinBox):
|
||||
# send only options supported by spinbox
|
||||
sbOpts = {}
|
||||
if 'units' in opts and 'suffix' not in opts:
|
||||
opts['suffix'] = opts['units']
|
||||
self.widget.setOpts(**opts)
|
||||
sbOpts['suffix'] = opts['units']
|
||||
for k,v in opts.items():
|
||||
if k in self.widget.opts:
|
||||
sbOpts[k] = v
|
||||
self.widget.setOpts(**sbOpts)
|
||||
self.updateDisplayLabel()
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user