[apps/shared/values_controller] Remove configureAbscissa() and configureFunction()

This commit is contained in:
Ruben Dashyan
2019-08-29 10:22:58 +02:00
parent 6bee336349
commit 5cdecc252f
2 changed files with 7 additions and 23 deletions

View File

@@ -86,11 +86,15 @@ bool ValuesController::handleEvent(Ion::Events::Event event) {
return header()->handleEvent(event);
}
if ((event == Ion::Events::OK || event == Ion::Events::EXE) && selectedRow() == 0) {
ViewController * parameterController = nullptr;
if (typeAtLocation(selectedColumn(), 0) == 0) {
configureAbscissa();
return true;
parameterController = &m_abscissaParameterController;
} else {
parameterController = functionParameterController();
}
if (parameterController) {
stackController()->push(parameterController);
}
configureFunction();
return true;
}
return false;
@@ -239,24 +243,6 @@ StackViewController * ValuesController::stackController() const {
return (StackViewController *)(parentResponder()->parentResponder()->parentResponder());
}
void ValuesController::configureAbscissa() {
StackViewController * stack = stackController();
stack->push(&m_abscissaParameterController);
}
void ValuesController::configureFunction() {
#if COPY_COLUMN
#else
/* Temporary: the sequence value controller does not have a function parameter
* controller yet but it shoult come soon. */
if (functionParameterController() == nullptr) {
return;
}
#endif
StackViewController * stack = stackController();
stack->push(functionParameterController());
}
bool ValuesController::cellAtLocationIsEditable(int columnIndex, int rowIndex) {
return typeAtLocation(columnIndex, rowIndex) == 2;
}