diff --git a/apps/sequence/list/list_controller.cpp b/apps/sequence/list/list_controller.cpp index e3e2f631c..d78c13d57 100644 --- a/apps/sequence/list/list_controller.cpp +++ b/apps/sequence/list/list_controller.cpp @@ -40,8 +40,7 @@ int ListController::numberOfExpressionRows() const { KDCoordinate ListController::expressionRowHeight(int j) { KDCoordinate defaultHeight = Metric::StoreRowHeight; - if (modelStore()->numberOfModels() < modelStore()->maxNumberOfModels() && j == numberOfRows() - 1) { - // Add sequence row + if (isAddEmptyRow(j)) { return defaultHeight; } Sequence * sequence = modelStore()->modelForRecord(modelStore()->recordAtIndex(modelIndexForRow(j))); diff --git a/apps/solver/list_controller.cpp b/apps/solver/list_controller.cpp index 902c226c5..c9d30fa88 100644 --- a/apps/solver/list_controller.cpp +++ b/apps/solver/list_controller.cpp @@ -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());