[code] The maximal number of scripts is stored in the ScriptStore.

It was in the MenuController before.

Change-Id: I5f48465d92b53079dc358feec7a4b713875c7e2d
This commit is contained in:
Léa Saviot
2017-11-22 11:04:14 +01:00
parent 9d82804ff3
commit 37a2def2f1
4 changed files with 3 additions and 4 deletions

View File

@@ -325,7 +325,6 @@ bool MenuController::textFieldDidAbortEditing(TextField * textField, const char
}
void MenuController::addScript() {
assert(m_scriptStore->numberOfScripts() < k_maxNumberOfScripts);
if (m_scriptStore->addNewScript()) {
updateAddScriptRowDisplay();
m_selectableTableView.reloadData();
@@ -387,7 +386,7 @@ void MenuController::intToText(int i, char * buffer) {
}
void MenuController::updateAddScriptRowDisplay() {
m_shouldDisplayAddScriptRow = (m_scriptStore->numberOfScripts() < k_maxNumberOfScripts && !m_scriptStore->isFull());
m_shouldDisplayAddScriptRow = !m_scriptStore->isFull();
}
}