Consolidate to simpler get is not none check.

This commit is contained in:
fake-name 2019-06-24 13:35:22 -07:00
parent 17e90af36c
commit 18999c2ca1

View File

@ -383,19 +383,19 @@ class PlotCurveItem(GraphicsObject):
self._mouseShape = None
#self.xDisp = self.yDisp = None
if 'name' in kargs:
if kargs.get("name") is not None:
self.opts['name'] = kargs['name']
if 'connect' in kargs:
if kargs.get("connect") is not None:
self.opts['connect'] = kargs['connect']
if 'pen' in kargs:
if kargs.get("pen") is not None:
self.setPen(kargs['pen'])
if 'shadowPen' in kargs and kargs['shadowPen'] is not None:
if kargs.get("shadowPen") is not None:
self.setShadowPen(kargs['shadowPen'])
if 'fillLevel' in kargs and kargs['fillLevel'] is not None:
if kargs.get("fillLevel") is not None:
self.setFillLevel(kargs['fillLevel'])
if 'brush' in kargs and kargs['brush'] is not None:
if kargs.get("brush") is not None:
self.setBrush(kargs['brush'])
if 'antialias' in kargs:
if kargs.get("antialias") is not None:
self.opts['antialias'] = kargs['antialias']
@ -482,8 +482,7 @@ class PlotCurveItem(GraphicsObject):
p.fillPath(self.fillPath, self.opts['brush'])
profiler('draw fill path')
sp = self.opts['shadowPen']
cp = self.opts['pen']
cp = fn.mkPen(self.opts['pen'])
## Copy pens and apply alpha adjustment
#sp = QtGui.QPen(self.opts['shadowPen'])