Merge pull request #1159 from 2xB/2xb-fix-1144

Fix: Update axes after data is set
This commit is contained in:
Ogi Moore 2020-04-09 07:50:25 -07:00 committed by GitHub
commit 4dde1529ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -365,11 +365,12 @@ class PlotCurveItem(GraphicsObject):
#self.setCacheMode(QtGui.QGraphicsItem.NoCache) ## Disabling and re-enabling the cache works around a bug in Qt 4.6 causing the cached results to display incorrectly
## Test this bug with test_PlotWidget and zoom in on the animated plot
self.yData = kargs['y'].view(np.ndarray)
self.xData = kargs['x'].view(np.ndarray)
self.invalidateBounds()
self.prepareGeometryChange()
self.informViewBoundsChanged()
self.yData = kargs['y'].view(np.ndarray)
self.xData = kargs['x'].view(np.ndarray)
profiler('copy')