From 01a049aa20cde66bf2a7fd29144491f3f2c322d8 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 9 Dec 2024 15:05:13 -0300 Subject: [PATCH] Fix call to ScaleEngine.autoScale 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. --- qwt/plot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qwt/plot.py b/qwt/plot.py index 298382c..1e46d36 100644 --- a/qwt/plot.py +++ b/qwt/plot.py @@ -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