[apps/calculation] Fixed ellipsis scrolling

When scrolling to a calculation without additional outputs from a
calculation with additional outputs, the ellipsis, though invisible,
would remain selected.

Change-Id: I7408ae004b9374e432ac58361616fa2ecf1550d8
This commit is contained in:
Gabriel Ozouf
2020-06-25 11:37:58 +02:00
parent 981c627bc4
commit 363bf4a620

View File

@@ -161,6 +161,9 @@ void HistoryController::tableViewDidChangeSelectionAndDidScroll(SelectableTableV
setSelectedSubviewType(SubviewType::Input, false, previousSelectedCellX, previousSelectedCellY);
} else {
HistoryViewCell * selectedCell = (HistoryViewCell *)(t->selectedCell());
if (selectedSubviewType() == SubviewType::Ellipsis && selectedCell->additionalInformationType() == Calculation::AdditionalInformationType::None) {
setSelectedSubviewType(SubviewType::Output, false, previousSelectedCellX, previousSelectedCellY);
}
SubviewType nextSelectedSubviewType = selectedSubviewType();
if (selectedCell && !selectedCell->displaysSingleLine()) {
nextSelectedSubviewType = previousSelectedCellY < selectedRow() ? SubviewType::Input : SubviewType::Output;