None-check self.label before access
This commit is contained in:
parent
ed66eef203
commit
8b4db67ae9
@ -233,6 +233,10 @@ class AxisItem(GraphicsWidget):
|
|||||||
|
|
||||||
## Set the position of the label
|
## Set the position of the label
|
||||||
nudge = 5
|
nudge = 5
|
||||||
|
if self.label is None: # self.label is set to None on close, but resize events can still occur.
|
||||||
|
self.picture = None
|
||||||
|
return
|
||||||
|
|
||||||
br = self.label.boundingRect()
|
br = self.label.boundingRect()
|
||||||
p = QtCore.QPointF(0, 0)
|
p = QtCore.QPointF(0, 0)
|
||||||
if self.orientation == 'left':
|
if self.orientation == 'left':
|
||||||
|
Loading…
Reference in New Issue
Block a user