diff --git a/pyqtgraph/imageview/ImageView.py b/pyqtgraph/imageview/ImageView.py index f0c13a60..cb72241a 100644 --- a/pyqtgraph/imageview/ImageView.py +++ b/pyqtgraph/imageview/ImageView.py @@ -209,7 +209,7 @@ class ImageView(QtGui.QWidget): *pos* Change the position of the displayed image *scale* Change the scale of the displayed image - *transform* Set the transform of the dispalyed image. This option overrides *pos* + *transform* Set the transform of the displayed image. This option overrides *pos* and *scale*. ============== ======================================================================= """ @@ -271,8 +271,9 @@ class ImageView(QtGui.QWidget): if levels is None and autoLevels: self.autoLevels() if levels is not None: ## this does nothing since getProcessedImage sets these values again. - self.levelMax = levels[1] - self.levelMin = levels[0] + #self.levelMax = levels[1] + #self.levelMin = levels[0] + self.setLevels(*levels) if self.ui.roiBtn.isChecked(): self.roiChanged() diff --git a/pyqtgraph/parametertree/ParameterItem.py b/pyqtgraph/parametertree/ParameterItem.py index 376e900d..46499fd3 100644 --- a/pyqtgraph/parametertree/ParameterItem.py +++ b/pyqtgraph/parametertree/ParameterItem.py @@ -157,3 +157,9 @@ class ParameterItem(QtGui.QTreeWidgetItem): ## since destroying the menu in mid-action will cause a crash. QtCore.QTimer.singleShot(0, self.param.remove) + ## for python 3 support, we need to redefine hash and eq methods. + def __hash__(self): + return id(self) + + def __eq__(self, x): + return x is self diff --git a/pyqtgraph/widgets/SpinBox.py b/pyqtgraph/widgets/SpinBox.py index 71695f4a..57e4f1ed 100644 --- a/pyqtgraph/widgets/SpinBox.py +++ b/pyqtgraph/widgets/SpinBox.py @@ -313,7 +313,7 @@ class SpinBox(QtGui.QAbstractSpinBox): s = [D(-1), D(1)][n >= 0] ## determine sign of step val = self.val - for i in range(abs(n)): + for i in range(int(abs(n))): if self.opts['log']: raise Exception("Log mode no longer supported.")