[apps/calculation] Calculations now hold 4 texts: input, exact output

and 2 approximate outputs - one with the maximal number of significant
digits and one with the number of significant digits asked by the user.
This enables to find the approximate output without going through the
approximation routine again.
This commit is contained in:
Émilie Feral
2020-01-22 13:40:57 +01:00
committed by Léa Saviot
parent 5631ef6ad0
commit c2540a1d8a
8 changed files with 95 additions and 58 deletions

View File

@@ -80,7 +80,7 @@ bool HistoryController::handleEvent(Ion::Events::Event event) {
if (outputSubviewPosition == ScrollableTwoExpressionsView::SubviewPosition::Right
&& !calculation->shouldOnlyDisplayExactOutput())
{
editController->insertTextBody(calculation->approximateOutputText());
editController->insertTextBody(calculation->approximateOutputText(Calculation::NumberOfSignificantDigits::Maximal));
} else {
editController->insertTextBody(calculation->exactOutputText());
}