ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #05658
[Merge] lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-bracket-push-fix into lp:ubuntu-calculator-app
Bartosz Kosiorek has proposed merging lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-bracket-push-fix into lp:ubuntu-calculator-app.
Commit message:
Allow add brackets in middle of calculation (LP: #1510982)
Requested reviews:
Ubuntu Calculator Developers (ubuntu-calculator-dev)
Related bugs:
Bug #1510982 in Ubuntu Calculator App: "No way to insert brackets in the middle of a calculation"
https://bugs.launchpad.net/ubuntu-calculator-app/+bug/1510982
For more details, see:
https://code.launchpad.net/~gang65/ubuntu-calculator-app/ubuntu-calculator-app-bracket-push-fix/+merge/276055
Allow add brackets in middle of calculation (LP: #1510982)
--
Your team Ubuntu Calculator Developers is requested to review the proposed merge of lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-bracket-push-fix into lp:ubuntu-calculator-app.
=== modified file 'app/ubuntu-calculator-app.qml'
--- app/ubuntu-calculator-app.qml 2015-08-02 12:16:28 +0000
+++ app/ubuntu-calculator-app.qml 2015-10-28 21:00:04 +0000
@@ -146,16 +146,19 @@
}
isLastCalculate = false;
- if (visual === "()") {
- visual = Formula.determineBracketTypeToAdd(longFormula)
- }
// Validate whole longFormula if the cursor is at the end of string
if (textInputField.cursorPosition === textInputField.length) {
+ if (visual === "()") {
+ visual = Formula.determineBracketTypeToAdd(longFormula)
+ }
if (Formula.validateStringForAddingToFormula(longFormula, visual) === false) {
errorAnimation.restart();
return;
}
} else {
+ if (visual === "()") {
+ visual = Formula.determineBracketTypeToAdd(longFormula.slice(0, textInputField.cursorPosition))
+ }
if (Formula.validateStringForAddingToFormula(longFormula.slice(0, textInputField.cursorPosition), visual) === false) {
errorAnimation.restart();
return;
@@ -190,8 +193,6 @@
textInputField.cursorPosition = preservedCursorPosition + visual.length;
}
-
-
// Add here operators that have always priority
if ((visual.toString() === "*") || (visual.toString() === ")")) {
isFormulaIsValidToCalculate = true;
=== modified file 'debian/changelog'
--- debian/changelog 2015-10-19 22:36:57 +0000
+++ debian/changelog 2015-10-28 21:00:04 +0000
@@ -27,8 +27,9 @@
* Upgrade math.js to 2.1.1 to improve performance (LP: #1484851)
* Upgrade math.js to 2.4.0 to resolve wrong calculation of sin and cos functions,
for values around multiples of tau (i.e. sin(7)) (LP: #1507799)
+ * Allow add brackets in middle of calculation (LP: #1510982)
- -- Bartosz Kosiorek <gang65@xxxxxxxxxxxxxx> Fri, 14 Aug 2015 11:04:30 +0200
+ -- Bartosz Kosiorek <gang65@xxxxxxxxxxxxxx> Wed, 28 Oct 2015 21:56:29 +0100
ubuntu-calculator-app (2.0.182) vivid; urgency=medium
* Add haptic feedback to buttons
Follow ups
-
Re: [Merge] lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-bracket-push-fix into lp:ubuntu-calculator-app
From: Jenkins Bot, 2015-11-06
-
[Merge] lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-bracket-push-fix into lp:ubuntu-calculator-app
From: noreply, 2015-11-06
-
[Merge] lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-bracket-push-fix into lp:ubuntu-calculator-app
From: Bartosz Kosiorek, 2015-11-05
-
Re: [Merge] lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-bracket-push-fix into lp:ubuntu-calculator-app
From: Riccardo Padovani, 2015-11-05
-
[Merge] lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-bracket-push-fix into lp:ubuntu-calculator-app
From: Jenkins Bot, 2015-11-05
-
Re: [Merge] lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-bracket-push-fix into lp:ubuntu-calculator-app
From: Jenkins Bot, 2015-11-05
-
[Merge] lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-bracket-push-fix into lp:ubuntu-calculator-app
From: Riccardo Padovani, 2015-11-05
-
Re: [Merge] lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-bracket-push-fix into lp:ubuntu-calculator-app
From: Jenkins Bot, 2015-11-05
-
[Merge] lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-bracket-push-fix into lp:ubuntu-calculator-app
From: Jenkins Bot, 2015-11-05
-
[Merge] lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-bracket-push-fix into lp:ubuntu-calculator-app
From: Riccardo Padovani, 2015-11-05
-
Re: [Merge] lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-bracket-push-fix into lp:ubuntu-calculator-app
From: Riccardo Padovani, 2015-11-05
-
[Merge] lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-bracket-push-fix into lp:ubuntu-calculator-app
From: Bartosz Kosiorek, 2015-10-30
-
Re: [Merge] lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-bracket-push-fix into lp:ubuntu-calculator-app
From: Ubuntu Phone Apps Jenkins Bot, 2015-10-28
-
Re: [Merge] lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-bracket-push-fix into lp:ubuntu-calculator-app
From: Jenkins Bot, 2015-10-28