[apps/calculation] HistoryController: fix order of actions in Backspace

handle event

This fixes the following bug: input 1/2/3/4/5/6/7/8, OK, OK, input 1,
OK, up, backspace. The selection disappeared.
This commit is contained in:
Émilie Feral
2020-06-26 17:31:10 +02:00
parent aef804d149
commit 94d3ac9828

View File

@@ -128,8 +128,8 @@ bool HistoryController::handleEvent(Ion::Events::Event event) {
return true;
}
m_selectableTableView.selectCellAtLocation(0, focusRow > 0 ? focusRow - 1 : 0);
tableViewDidChangeSelectionAndDidScroll(&m_selectableTableView, 0, (subviewType == SubviewType::Input) ? selectedRow() : -1);
m_selectableTableView.scrollToCell(0, selectedRow());
tableViewDidChangeSelectionAndDidScroll(&m_selectableTableView, 0, (subviewType == SubviewType::Input) ? selectedRow() : -1);
return true;
}
if (event == Ion::Events::Clear) {