[apps/calculation] Change calculation store model to be a buffer ring

Change-Id: Ic444456288e68dcf7b78705880b9507de0a95a2d
This commit is contained in:
Émilie Feral
2016-10-25 17:34:52 +02:00
parent c94183253c
commit e9795b16da
6 changed files with 69 additions and 44 deletions

View File

@@ -68,9 +68,10 @@ bool EditExpressionController::handleEvent(Ion::Events::Event event) {
switch (event) {
case Ion::Events::Event::ENTER:
{
Calculation * calculation = m_calculationStore->addEmptyCalculation();
Calculation calculation = Calculation();
App * calculationApp = (App *)app();
calculation->setContent(textBody(), calculationApp->globalContext());
calculation.setContent(textBody(), calculationApp->globalContext());
m_calculationStore->push(&calculation);
m_historyController->reload();
m_contentView.textField()->setTextBuffer("");
return true;