PlotCurveItem.boundingRect: check for None returned from self.dataBounds

This commit is contained in:
Mikhail Terekhov 2014-03-20 14:59:21 -04:00
parent abfac52c34
commit 1ad3eacb78

View File

@ -194,8 +194,10 @@ class PlotCurveItem(GraphicsObject):
def boundingRect(self):
if self._boundingRect is None:
(xmn, xmx) = self.dataBounds(ax=0)
if xmn is None or xmx is None:
return QtCore.QRectF()
(ymn, ymx) = self.dataBounds(ax=1)
if xmn is None or ymn is None:
if ymn is None or ymx is None:
return QtCore.QRectF()
px = py = 0.0