From c0ebf8a432f785d68814c890fe3c22b9fcffe154 Mon Sep 17 00:00:00 2001 From: njessurun Date: Wed, 2 Jun 2021 11:03:22 -0400 Subject: [PATCH] Fix #1814 --- pyqtgraph/parametertree/Parameter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyqtgraph/parametertree/Parameter.py b/pyqtgraph/parametertree/Parameter.py index c084634a..81385a31 100644 --- a/pyqtgraph/parametertree/Parameter.py +++ b/pyqtgraph/parametertree/Parameter.py @@ -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)