From e4848a7535fc00bea065a00955db9a2ddafdf03e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Fri, 10 Apr 2020 14:35:39 +0200 Subject: [PATCH] [apps/calculation] HistoryController: favour understandable code --- apps/calculation/history_controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/calculation/history_controller.cpp b/apps/calculation/history_controller.cpp index 694374f02..6e437fce0 100644 --- a/apps/calculation/history_controller.cpp +++ b/apps/calculation/history_controller.cpp @@ -127,7 +127,7 @@ bool HistoryController::handleEvent(Ion::Events::Event event) { Container::activeApp()->setFirstResponder(parentResponder()); return true; } - m_selectableTableView.selectCellAtLocation(0, (focusRow > 0) * (focusRow - 1)); + m_selectableTableView.selectCellAtLocation(0, focusRow > 0 ? focusRow - 1 : 0); tableViewDidChangeSelection(&m_selectableTableView, 0, (subviewType == SubviewType::Input) ? selectedRow() : -1); m_selectableTableView.scrollToCell(0, selectedRow()); return true;