[graph] Fix a bug when zooming

When entering the Navigate menu, a portion of the Y axis is memoized to
preserve the grid units.
However, this portion was not modified when zooming, causing some
glitches.

Change-Id: I06b4ee044eaa75d48b8f338c9ef6ea33bb299e39
This commit is contained in:
Gabriel Ozouf
2020-11-16 14:50:00 +01:00
committed by EmilieNumworks
parent ea3e3287dc
commit 41778433b1
2 changed files with 2 additions and 0 deletions

View File

@@ -115,6 +115,7 @@ void InteractiveCurveViewRange::zoom(float ratio, float x, float y) {
m_yRange.setMax(newYMax, k_lowerMaxFloat, k_upperMaxFloat);
MemoizedCurveViewRange::protectedSetYMin(newYMin, k_lowerMaxFloat, k_upperMaxFloat);
}
m_offscreenYAxis *= ratio;
}
void InteractiveCurveViewRange::panWithVector(float x, float y) {

View File

@@ -14,6 +14,7 @@ public:
InteractiveCurveViewRange(InteractiveCurveViewRangeDelegate * delegate = nullptr) :
MemoizedCurveViewRange(),
m_delegate(nullptr),
m_offscreenYAxis(0.f),
m_zoomAuto(true),
m_zoomNormalize(false)
{