[apps/sequence|graph] Event on right on chevron cell behaves as OK

Change-Id: I3ca047233c5ce637a29ee759153337c0c01cd073
This commit is contained in:
Émilie Feral
2017-06-09 10:38:52 +02:00
parent 3a9bfed08a
commit 4396b3f190
5 changed files with 14 additions and 3 deletions

View File

@@ -27,7 +27,7 @@ void CurveParameterController::willDisplayCellForIndex(HighlightCell * cell, int
}
bool CurveParameterController::handleEvent(Ion::Events::Event event) {
if (event == Ion::Events::OK || event == Ion::Events::EXE) {
if (event == Ion::Events::OK || event == Ion::Events::EXE || (event == Ion::Events::Right && (selectedRow() == 0 || selectedRow() == 1))) {
switch (selectedRow()) {
case 0:
return true;

View File

@@ -19,7 +19,7 @@ const char * CurveParameterController::title() {
}
bool CurveParameterController::handleEvent(Ion::Events::Event event) {
if (event == Ion::Events::OK || event == Ion::Events::EXE) {
if (event == Ion::Events::OK || event == Ion::Events::EXE || (event == Ion::Events::Right && selectedRow() == 1)) {
switch (selectedRow()) {
case 0:
{

View File

@@ -17,7 +17,9 @@ View * FunctionCurveParameterController::view() {
}
void FunctionCurveParameterController::didBecomeFirstResponder() {
selectCellAtLocation(0, 0);
if (selectedRow() < 0) {
selectCellAtLocation(0, 0);
}
app()->setFirstResponder(&m_selectableTableView);
}

View File

@@ -41,4 +41,12 @@ void FunctionGoToParameterController::setFunction(Function * function) {
m_function = function;
}
bool FunctionGoToParameterController::handleEvent(Ion::Events::Event event) {
if (event == Ion::Events::Left) {
stackController()->pop();
return true;
}
return false;
}
}

View File

@@ -11,6 +11,7 @@ public:
FunctionGoToParameterController(Responder * parentResponder, InteractiveCurveViewRange * graphRange, CurveViewCursor * cursor, I18n::Message symbol);
const char * title() override;
void setFunction(Function * function);
bool handleEvent(Ion::Events::Event event) override;
protected:
bool setParameterAtIndex(int parameterIndex, float f) override;
Function * m_function;