[apps/calculation/history_controller] Factor handleEvent

This commit is contained in:
Ruben Dashyan
2020-03-05 16:22:17 +01:00
committed by Émilie Feral
parent f3bcedd43d
commit a3265996fe

View File

@@ -124,11 +124,7 @@ bool HistoryController::handleEvent(Ion::Events::Event event) {
Container::activeApp()->setFirstResponder(parentResponder());
return true;
}
if (focusRow > 0) {
m_selectableTableView.selectCellAtLocation(0, focusRow-1);
} else {
m_selectableTableView.selectCellAtLocation(0, 0);
}
m_selectableTableView.selectCellAtLocation(0, (focusRow > 0) * (focusRow - 1));
if (subviewType == SubviewType::Input) {
tableViewDidChangeSelection(&m_selectableTableView, 0, selectedRow());
} else {