This commit is contained in:
njessurun 2021-06-02 11:03:22 -04:00
parent c0b9f3e26e
commit c0ebf8a432

View File

@ -441,13 +441,13 @@ class Parameter(QtCore.QObject):
def valueIsDefault(self):
"""Returns True if this parameter's value is equal to the default value."""
return self.value() == self.defaultValue()
return fn.eq(self.value(), self.defaultValue())
def setLimits(self, limits):
"""Set limits on the acceptable values for this parameter.
The format of limits depends on the type of the parameter and
some parameters do not make use of limits at all."""
if 'limits' in self.opts and self.opts['limits'] == limits:
if 'limits' in self.opts and fn.eq(self.opts['limits'], limits):
return
self.opts['limits'] = limits
self.sigLimitsChanged.emit(self, limits)