[calculation] Revert "HistoryViewCell: remove useless m_expandedCalculation"

When scrolling up and down, only 'setCalculation' is called by
'willDisplayCellForIndex' - and not 'cellDidSelectSubview'. So a new cell
should be informed of the expanded state in 'setCalculation'.
This commit is contained in:
Émilie Feral
2020-01-03 12:19:21 +01:00
committed by Léa Saviot
parent 80d8e8eead
commit 73a8ec24f2
3 changed files with 5 additions and 4 deletions

View File

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