Allow AxisItem.setScale(None) to retain API backward compatibility.

This commit is contained in:
Luke Campagnola 2013-10-18 15:02:17 -04:00
parent 03fd45c24a
commit f19df05bdf

View File

@ -293,6 +293,11 @@ class AxisItem(GraphicsWidget):
the view coordinate system were scaled. By default, the axis scaling is
1.0.
"""
# Deprecated usage, kept for backward compatibility
if scale is None:
scale = 1.0
self.enableAutoSIPrefix(True)
if scale != self.scale:
self.scale = scale
self.setLabel()