diff --git a/apps/sequence/list/list_parameter_controller.cpp b/apps/sequence/list/list_parameter_controller.cpp index aced0a2a4..dd9c631ad 100644 --- a/apps/sequence/list/list_parameter_controller.cpp +++ b/apps/sequence/list/list_parameter_controller.cpp @@ -27,16 +27,16 @@ bool ListParameterController::handleEvent(Ion::Events::Event event) { if (event == Ion::Events::OK) { int selectedRowIndex = m_selectableTableView.selectedRow(); switch (selectedRowIndex) { - case 0: - return handleEnterOnRow(selectedRowIndex); - case 1: + /*case 0: + return handleEnterOnRow(selectedRowIndex);*/ + case 0://1 { StackViewController * stack = (StackViewController *)(parentResponder()); m_typeParameterController.setSequence(m_sequence); stack->push(&m_typeParameterController); return true; } - case 3: + case 2://3 if (m_functionStore->numberOfFunctions() > 0) { m_functionStore->removeFunction(m_function); StackViewController * stack = (StackViewController *)(parentResponder()); @@ -56,10 +56,10 @@ int ListParameterController::numberOfRows() { HighlightCell * ListParameterController::reusableCell(int index) { switch (index) { - case 0: - return Shared::ListParameterController::reusableCell(index); - case 1: - return &m_typeCell; + /*case 0: + return Shared::ListParameterController::reusableCell(index);*/ + case 0://1: + return &m_typeCell; default: return Shared::ListParameterController::reusableCell(index-1); } diff --git a/apps/sequence/list/list_parameter_controller.h b/apps/sequence/list/list_parameter_controller.h index ff479670a..1fc9a2d5e 100644 --- a/apps/sequence/list/list_parameter_controller.h +++ b/apps/sequence/list/list_parameter_controller.h @@ -21,7 +21,8 @@ public: int reusableCellCount() override; void willDisplayCellForIndex(HighlightCell * cell, int index) override; private: - constexpr static int k_totalNumberOfCell = 4; + /* TODO: implement function color choice */ + constexpr static int k_totalNumberOfCell = 3;//4 MessageTableCellWithChevronAndExpression m_typeCell; TypeParameterController m_typeParameterController; Sequence * m_sequence; diff --git a/apps/shared/list_parameter_controller.cpp b/apps/shared/list_parameter_controller.cpp index f4d61d480..a2717cce6 100644 --- a/apps/shared/list_parameter_controller.cpp +++ b/apps/shared/list_parameter_controller.cpp @@ -8,7 +8,7 @@ ListParameterController::ListParameterController(Responder * parentResponder, Fu m_selectableTableView(SelectableTableView(this, this, 0, 1, Metric::CommonTopMargin, Metric::CommonRightMargin, Metric::CommonBottomMargin, Metric::CommonLeftMargin)), m_functionStore(functionStore), - m_colorCell(MessageTableCellWithChevron(functionColorMessage)), + //m_colorCell(MessageTableCellWithChevron(functionColorMessage)), m_enableCell(MessageTableCellWithSwitch(I18n::Message::ActivateDesactivate)), m_deleteCell(MessageTableCell(deleteFunctionMessage)) { @@ -58,7 +58,7 @@ int ListParameterController::numberOfRows() { HighlightCell * ListParameterController::reusableCell(int index) { assert(index >= 0); assert(index < k_totalNumberOfCell); - HighlightCell * cells[] = {&m_colorCell, &m_enableCell, &m_deleteCell}; + HighlightCell * cells[] = {&m_enableCell, &m_deleteCell};//{&m_colorCell, &m_enableCell, &m_deleteCell}; return cells[index]; } @@ -72,13 +72,12 @@ KDCoordinate ListParameterController::cellHeight() { bool ListParameterController::handleEnterOnRow(int rowIndex) { switch (rowIndex) { - case 0: - return true; - case 1: + /* TODO: implement function color choice */ + case 0://1: m_function->setActive(!m_function->isActive()); m_selectableTableView.reloadData(); return true; - case 2: + case 1://2: { if (m_functionStore->numberOfFunctions() > 1) { m_functionStore->removeFunction(m_function); diff --git a/apps/shared/list_parameter_controller.h b/apps/shared/list_parameter_controller.h index 236838718..7675dda9a 100644 --- a/apps/shared/list_parameter_controller.h +++ b/apps/shared/list_parameter_controller.h @@ -28,8 +28,9 @@ protected: FunctionStore * m_functionStore; Function * m_function; private: - constexpr static int k_totalNumberOfCell = 3; - MessageTableCellWithChevron m_colorCell; + /* TODO: implement function color choice */ + constexpr static int k_totalNumberOfCell = 2;//3; + //MessageTableCellWithChevron m_colorCell; MessageTableCellWithSwitch m_enableCell; MessageTableCell m_deleteCell; };