From 13d494f1b7f863c3edcee5058b9ffbd70dac8ca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Fri, 28 Oct 2016 17:54:03 +0200 Subject: [PATCH] [apps/calculation] Handle clearing all history Change-Id: Ib18a0a25b9124d1ca9749d428404e0f1577c6b16 --- apps/calculation/history_controller.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/calculation/history_controller.cpp b/apps/calculation/history_controller.cpp index 0249cf765..d30dbcaa4 100644 --- a/apps/calculation/history_controller.cpp +++ b/apps/calculation/history_controller.cpp @@ -104,6 +104,13 @@ bool HistoryController::handleEvent(Ion::Events::Event event) { m_selectableTableView.scrollToCell(0, m_selectableTableView.selectedRow()); return true; } + case Ion::Events::Event::CLEAR: + { + m_calculationStore->deleteAll(); + reload(); + app()->setFirstResponder(parentResponder()); + return true; + } default: return false; }