[apps/shared] Fix bug in go to parameter controllers

Change-Id: I196378c4921583af42dc4a2e64e3a6c32038f9d1
This commit is contained in:
Émilie Feral
2017-03-29 16:30:37 +02:00
parent ffd6e61328
commit e95ea50d3c
5 changed files with 12 additions and 11 deletions

View File

@@ -56,8 +56,6 @@ bool GoToParameterController::setParameterAtIndex(int parameterIndex, float f) {
app()->displayWarning(I18n::Message::ForbiddenValue);
return false;
}
m_store->centerAxisAround(CurveViewRange::Axis::X, f);
m_store->centerAxisAround(CurveViewRange::Axis::Y, y);
m_cursor->moveTo(f, y);
} else {
float x = m_store->xValueForYValue(f);
@@ -65,8 +63,6 @@ bool GoToParameterController::setParameterAtIndex(int parameterIndex, float f) {
app()->displayWarning(I18n::Message::ForbiddenValue);
return false;
}
m_store->centerAxisAround(CurveViewRange::Axis::X, x);
m_store->centerAxisAround(CurveViewRange::Axis::Y, f);
m_cursor->moveTo(x, f);
}
return true;
@@ -114,6 +110,8 @@ void GoToParameterController::viewWillAppear() {
}
void GoToParameterController::buttonAction() {
m_store->centerAxisAround(CurveViewRange::Axis::X, m_cursor->x());
m_store->centerAxisAround(CurveViewRange::Axis::Y, m_cursor->y());
StackViewController * stack = (StackViewController *)parentResponder();
stack->pop();
stack->pop();