minor ROI corrections

This commit is contained in:
Luke Campagnola 2016-05-09 09:00:41 -07:00
parent b4e41012d8
commit 5c58448658

View File

@ -225,7 +225,9 @@ class ROI(GraphicsObject):
multiple change functions to be called sequentially while minimizing processing overhead multiple change functions to be called sequentially while minimizing processing overhead
and repeated signals. Setting update=False also forces finish=False. 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) pos = Point(pos)
self.state['pos'] = pos self.state['pos'] = pos
QtGui.QGraphicsItem.setPos(self, pos) QtGui.QGraphicsItem.setPos(self, pos)
@ -944,6 +946,7 @@ class ROI(GraphicsObject):
if finish: if finish:
self.stateChangeFinished() self.stateChangeFinished()
self.informViewBoundsChanged()
def stateChangeFinished(self): def stateChangeFinished(self):
self.sigRegionChangeFinished.emit(self) self.sigRegionChangeFinished.emit(self)