revert style change reduction in PlotDataItem

This commit is contained in:
Nils Nemitz 2021-03-27 03:51:44 +09:00
parent 0234a27816
commit d8d5d49f04

View File

@ -542,7 +542,6 @@ class PlotDataItem(GraphicsObject):
if k in kargs: if k in kargs:
self.opts[k] = kargs[k] self.opts[k] = kargs[k]
self._styleWasChanged = True self._styleWasChanged = True
#curveArgs = {} #curveArgs = {}
#for k in ['pen', 'shadowPen', 'fillLevel', 'brush']: #for k in ['pen', 'shadowPen', 'fillLevel', 'brush']:
#if k in kargs: #if k in kargs:
@ -588,8 +587,14 @@ class PlotDataItem(GraphicsObject):
profiler('emit') profiler('emit')
def updateItems(self, styleUpdate=True): def updateItems(self, styleUpdate=True):
# override styleUpdate request and always enforce update until we have a better solution for
# - ScatterPlotItem losing per-point style information
# - PlotDataItem performing multiple unnecessary setData call on initialization
styleUpdate=True
curveArgs = {} curveArgs = {}
scatterArgs = {} scatterArgs = {}
if styleUpdate: # repeat style arguments only when changed if styleUpdate: # repeat style arguments only when changed
for k,v in [('pen','pen'), ('shadowPen','shadowPen'), ('fillLevel','fillLevel'), ('fillOutline', 'fillOutline'), ('fillBrush', 'brush'), ('antialias', 'antialias'), ('connect', 'connect'), ('stepMode', 'stepMode')]: for k,v in [('pen','pen'), ('shadowPen','shadowPen'), ('fillLevel','fillLevel'), ('fillOutline', 'fillOutline'), ('fillBrush', 'brush'), ('antialias', 'antialias'), ('connect', 'connect'), ('stepMode', 'stepMode')]:
if k in self.opts: if k in self.opts: