Merge branch 'showValues_fix' of https://github.com/JNevrly/pyqtgraph into JNevrly-showValues_fix

This commit is contained in:
Luke Campagnola 2014-03-29 10:45:51 -04:00
commit 8c0940555a

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:
@ -775,7 +779,7 @@ class AxisItem(GraphicsWidget):
textSize2 = 0
textRects = []
textSpecs = [] ## list of draw
textSize2 = 0
if self.showValues:
for i in range(len(tickLevels)):
## Get the list of strings to display for this level
if tickStrings is None: