Fixes calculation of axis width/height in case values are not shown.
This commit is contained in:
parent
22ecd3cc41
commit
aa4b790dd2
@ -242,6 +242,8 @@ class AxisItem(GraphicsWidget):
|
||||
"""Set the height of this axis reserved for ticks and tick labels.
|
||||
The height of the axis label is automatically added."""
|
||||
if h is None:
|
||||
h = 0
|
||||
if self.showValues:
|
||||
if self.style['autoExpandTextSpace'] is True:
|
||||
h = self.textHeight
|
||||
else:
|
||||
@ -258,6 +260,8 @@ class AxisItem(GraphicsWidget):
|
||||
"""Set the width of this axis reserved for ticks and tick labels.
|
||||
The width of the axis label is automatically added."""
|
||||
if w is None:
|
||||
w = 0
|
||||
if self.showValues:
|
||||
if self.style['autoExpandTextSpace'] is True:
|
||||
w = self.textWidth
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user