From 5c58448658bb63673b52139bac20599f16fa2b93 Mon Sep 17 00:00:00 2001 From: Luke Campagnola Date: Mon, 9 May 2016 09:00:41 -0700 Subject: [PATCH] minor ROI corrections --- pyqtgraph/graphicsItems/ROI.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyqtgraph/graphicsItems/ROI.py b/pyqtgraph/graphicsItems/ROI.py index 3aa19daa..8a12ff3b 100644 --- a/pyqtgraph/graphicsItems/ROI.py +++ b/pyqtgraph/graphicsItems/ROI.py @@ -225,7 +225,9 @@ class ROI(GraphicsObject): multiple change functions to be called sequentially while minimizing processing overhead and repeated signals. Setting update=False also forces finish=False. """ - + # This avoids the temptation to do setPos(x, y) + if not isinstance(update, bool): + raise TypeError("update argument must be bool.") pos = Point(pos) self.state['pos'] = pos QtGui.QGraphicsItem.setPos(self, pos) @@ -944,6 +946,7 @@ class ROI(GraphicsObject): if finish: self.stateChangeFinished() + self.informViewBoundsChanged() def stateChangeFinished(self): self.sigRegionChangeFinished.emit(self)