Merge pull request #907 from jetperch/develop

Fixed ViewBox.updateViewRange to apply transformation sooner
This commit is contained in:
Ogi Moore 2019-05-31 21:05:29 -07:00 committed by GitHub
commit 99480dd184
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1496,14 +1496,13 @@ class ViewBox(GraphicsWidget):
changed = [(viewRange[i][0] != self.state['viewRange'][i][0]) or (viewRange[i][1] != self.state['viewRange'][i][1]) for i in (0,1)]
self.state['viewRange'] = viewRange
# emit range change signals
if changed[0]:
self.sigXRangeChanged.emit(self, tuple(self.state['viewRange'][0]))
if changed[1]:
self.sigYRangeChanged.emit(self, tuple(self.state['viewRange'][1]))
if any(changed):
self._matrixNeedsUpdate = True
# emit range change signals
if changed[0]:
self.sigXRangeChanged.emit(self, tuple(self.state['viewRange'][0]))
if changed[1]:
self.sigYRangeChanged.emit(self, tuple(self.state['viewRange'][1]))
self.sigRangeChanged.emit(self, self.state['viewRange'])
self.update()