~rpadovani/ubuntu-calculator-app/fixHistoryResults141221

« back to all changes in this revision

Viewing changes to app/ubuntu-calculator-app.qml

  • Committer: Riccardo Padovani
  • Date: 2014-12-24 16:09:15 UTC
  • Revision ID: rpadovani@ubuntu.com-20141224160915-txfx4ryqv8qupg0e
Use mathjs to format results

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
    // Last immission
57
57
    property var previousVisual;
58
58
 
59
 
 
60
59
    // Becomes true after an user presses the "="
61
60
    property bool isLastCalculate: false;
62
61
 
121
120
        } else {
122
121
            longFormula = longFormula.slice(0, textInputField.cursorPosition) + visual.toString() + longFormula.slice(textInputField.cursorPosition, longFormula.length);
123
122
            shortFormula = longFormula;
124
 
        }
 
123
        }
125
124
 
126
125
        var preservedCursorPosition = textInputField.cursorPosition;
127
126
        displayedInputText = Formula.returnFormulaToDisplay(shortFormula);