[apps/*/expression_model_list_controller] Use isAddEmptyRow

This commit is contained in:
Ruben Dashyan
2019-09-06 14:30:22 +02:00
committed by LeaNumworks
parent d8ec5ab2b3
commit a5bff416d1
2 changed files with 3 additions and 7 deletions

View File

@@ -43,10 +43,7 @@ Button * ListController::buttonAtIndex(int index, ButtonRowController::Position
}
int ListController::typeAtLocation(int i, int j) {
if (j == m_equationStore->numberOfModels()) {
return 1;
}
return 0;
return isAddEmptyRow(j);
}
HighlightCell * ListController::reusableCell(int index, int type) {
@@ -71,7 +68,7 @@ int ListController::reusableCellCount(int type) {
}
void ListController::willDisplayCellForIndex(HighlightCell * cell, int index) {
if (index != m_equationStore->numberOfModels()) {
if (!isAddEmptyRow(index)) {
willDisplayExpressionCellAtIndex(cell, index);
}
cell->setHighlighted(index == selectedRow());