2D: Fix stale axis displacement after zoom
Previously, when axis zoom was updated, it didn't update the axis
displacement. This was due to axis stepPx updating after the
displacement calculation. Displacement calculation depends on stepPx.
Because stepPx was updated after the displacement, the displacement
always used the previous stepPx value. Hence, the fix pan the graph a
little.
This patch moves the displacement calculation to happen in
AxisRenderer::updateAxis right after the stepPx calculation.
Pick-to: 6.12
Fixes: QTBUG-150068
Change-Id: I9763e787fe59d6585e27ce9f4b6a99b7178d6376
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Owais Akhtar <owais.akhtar@qt.io>