[apps/calculation] Fix calculation history index

This commit is contained in:
Léa Saviot
2019-07-16 17:12:29 +02:00
committed by Émilie Feral
parent 0f12d226ae
commit 1af882ddae

View File

@@ -141,7 +141,7 @@ int HistoryController::reusableCellCount(int type) {
void HistoryController::willDisplayCellForIndex(HighlightCell * cell, int index) {
HistoryViewCell * myCell = (HistoryViewCell *)cell;
myCell->setCalculation((m_calculationStore->calculationAtIndex(index)).pointer(), index == selectedRow() && selectedSubviewType() == SubviewType::Output);
myCell->setCalculation((m_calculationStore->calculationAtIndex(numberOfRows()-index-1)).pointer(), index == selectedRow() && selectedSubviewType() == SubviewType::Output);
myCell->setEven(index%2 == 0);
myCell->setHighlighted(myCell->isHighlighted());
}