diff --git a/examples/parametertree.py b/examples/parametertree.py index af1cf3ab..89932ed6 100644 --- a/examples/parametertree.py +++ b/examples/parametertree.py @@ -82,7 +82,7 @@ params = [ {'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': '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': [ diff --git a/pyqtgraph/widgets/SpinBox.py b/pyqtgraph/widgets/SpinBox.py index b1c72668..88cc02a6 100644 --- a/pyqtgraph/widgets/SpinBox.py +++ b/pyqtgraph/widgets/SpinBox.py @@ -223,6 +223,10 @@ class SpinBox(QtGui.QAbstractSpinBox): if 'format' not in opts: 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: self.proxy.setDelay(opts['delay'])