Skip to content

Commit

Permalink
Fix call to ScaleEngine.autoScale
Browse files Browse the repository at this point in the history
The original `QwtScaleEngine.autoScale` mutated the passed values in-place, but this was missed when the code was translated to Python, where `autoScale` returns the new values as a tuple.
  • Loading branch information
nicoddemus authored Dec 9, 2024
1 parent 35c9fc2 commit 01a049a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qwt/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ def updateAxes(self):
d.isValid = False
minValue = intv_i.minValue()
maxValue = intv_i.maxValue()
d.scaleEngine.autoScale(d.maxMajor, minValue, maxValue, stepSize)
minValue, maxValue, stepSize = d.scaleEngine.autoScale(d.maxMajor, minValue, maxValue, stepSize)
if not d.isValid:
d.scaleDiv = d.scaleEngine.divideScale(
minValue, maxValue, d.maxMajor, d.maxMinor, stepSize
Expand Down

0 comments on commit 01a049a

Please sign in to comment.