From e9c953fd6e56be6014c34d0b13cf41feab8b930e Mon Sep 17 00:00:00 2001 From: Gabriel Ozouf Date: Tue, 22 Dec 2020 10:40:53 +0100 Subject: [PATCH] [shared/interact_curve_view_range] Check orthonormality after zoom Zooming in and out on a graph usually preserves orthonormality. However, if the window has its bounds close to the limits for the values on the axes, zooming can change the ratio. --- apps/shared/interactive_curve_view_range.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/shared/interactive_curve_view_range.cpp b/apps/shared/interactive_curve_view_range.cpp index 7f38e4142..d1b6f6970 100644 --- a/apps/shared/interactive_curve_view_range.cpp +++ b/apps/shared/interactive_curve_view_range.cpp @@ -112,6 +112,7 @@ void InteractiveCurveViewRange::zoom(float ratio, float x, float y) { m_yRange.setMax(yMa, k_lowerMaxFloat, k_upperMaxFloat); MemoizedCurveViewRange::protectedSetYMin(yMi, k_lowerMaxFloat, k_upperMaxFloat); } + setZoomNormalize(isOrthonormal()); m_offscreenYAxis *= ratio; }