Merge pull request #1779 from manschloemark/master
Use fallback minStep in dec mode SpinBox (Issue 1756)
This commit is contained in:
commit
bcb6a5d66a
@ -82,7 +82,7 @@ params = [
|
|||||||
{'name': 'Units + SI prefix', 'type': 'float', 'value': 1.2e-6, 'step': 1e-6, 'siPrefix': True, 'suffix': 'V'},
|
{'name': 'Units + SI prefix', 'type': 'float', 'value': 1.2e-6, 'step': 1e-6, 'siPrefix': True, 'suffix': 'V'},
|
||||||
{'name': 'Limits (min=7;max=15)', 'type': 'int', 'value': 11, 'limits': (7, 15), 'default': -6},
|
{'name': 'Limits (min=7;max=15)', 'type': 'int', 'value': 11, 'limits': (7, 15), 'default': -6},
|
||||||
{'name': 'Int suffix', 'type': 'int', 'value': 9, 'suffix': 'V'},
|
{'name': 'Int suffix', 'type': 'int', 'value': 9, 'suffix': 'V'},
|
||||||
{'name': 'DEC stepping', 'type': 'float', 'value': 1.2e6, 'dec': True, 'step': 1, 'siPrefix': True, 'suffix': 'Hz'},
|
{'name': 'DEC stepping', 'type': 'float', 'value': 1.2e6, 'dec': True, 'step': 1, 'minStep': 1.0e-12, 'siPrefix': True, 'suffix': 'Hz'},
|
||||||
|
|
||||||
]},
|
]},
|
||||||
{'name': 'Save/Restore functionality', 'type': 'group', 'children': [
|
{'name': 'Save/Restore functionality', 'type': 'group', 'children': [
|
||||||
|
@ -224,6 +224,10 @@ class SpinBox(QtGui.QAbstractSpinBox):
|
|||||||
if 'format' not in opts:
|
if 'format' not in opts:
|
||||||
self.opts['format'] = asUnicode("{value:d}{suffixGap}{suffix}")
|
self.opts['format'] = asUnicode("{value:d}{suffixGap}{suffix}")
|
||||||
|
|
||||||
|
if self.opts['dec']:
|
||||||
|
if self.opts.get('minStep') is None:
|
||||||
|
self.opts['minStep'] = self.opts['step']
|
||||||
|
|
||||||
if 'delay' in opts:
|
if 'delay' in opts:
|
||||||
self.proxy.setDelay(opts['delay'])
|
self.proxy.setDelay(opts['delay'])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user