[apps/sequence] Do no add a new function as long as the user did not

choose a type

Change-Id: I67c3172b416d7d80a3bd9a4eb18091ab72626e4b
This commit is contained in:
Émilie Feral
2017-02-08 13:57:05 +01:00
parent 0f4d7f0914
commit 08a663a64f
7 changed files with 36 additions and 42 deletions

View File

@@ -50,7 +50,9 @@ bool ListController::handleEnter() {
{
if (m_functionStore->numberOfFunctions() < m_functionStore->maxNumberOfFunctions() &&
m_selectableTableView.selectedRow() == numberOfRows() - 1) {
return addFunction();
m_functionStore->addEmptyFunction();
m_selectableTableView.reloadData();
return true;
}
FunctionExpressionCell * functionCell = (FunctionExpressionCell *)(m_selectableTableView.cellAtLocation(m_selectableTableView.selectedColumn(), m_selectableTableView.selectedRow()));
editExpression(functionCell, Ion::Events::OK);