← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-temporarly-result-fix into lp:ubuntu-calculator-app

 

Bartosz Kosiorek has proposed merging lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-temporarly-result-fix into lp:ubuntu-calculator-app.

Commit message:
Temporary result fix

Requested reviews:
  Ubuntu Calculator Developers (ubuntu-calculator-dev)

For more details, see:
https://code.launchpad.net/~gang65/ubuntu-calculator-app/ubuntu-calculator-app-temporarly-result-fix/+merge/257447

Temporary result fix
-- 
Your team Ubuntu Calculator Developers is requested to review the proposed merge of lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-temporarly-result-fix into lp:ubuntu-calculator-app.
=== modified file 'app/ubuntu-calculator-app.qml'
--- app/ubuntu-calculator-app.qml	2015-04-24 16:22:05 +0000
+++ app/ubuntu-calculator-app.qml	2015-04-24 22:52:19 +0000
@@ -136,7 +136,7 @@
         // we display a temporary result instead the all operation
         if (isNaN(visual) && (visual.toString() !== ".") && isFormulaIsValidToCalculate) {
             try {
-                shortFormula = mathJs.eval(shortFormula);
+                shortFormula = mathJs.format(mathJs.eval(shortFormula)).toString();
             } catch(exception) {
                 console.log("Error: math.js " + exception.toString() + " engine formula:" + shortFormula);
             }


Follow ups