Fixes calculation of axis width/height in case values are not shown.

This commit is contained in:
JosefNevrly 2014-03-16 10:38:08 +01:00
parent 22ecd3cc41
commit aa4b790dd2

View File

@ -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: