[Calculator app] Wrong calculation results after pressing "C"

Bug #1164973 reported by Gustavo Pichorim Boiko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Calculator App
Fix Released
High
Riccardo Ferrazzo
Ubuntu UX
Fix Released
High
Christina Li

Bug Description

While testing the calculator application, I found that after playing a bit with typing and clearing (using C), so here is an easy way to reproduce it:

- Type 1+1=
- Press C until it clears it all
- Type 1+1=

See the result.
Please after fixing the bug add an autopilot test for this usecase.

Related branches

Changed in ubuntu-calculator-app:
assignee: nobody → Riccardo Ferrazzo (f-riccardo87)
importance: Undecided → High
summary: - Wrong calculation results after pressing "C"
+ [Calculator app] Wrong calculation results after pressing "C"
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

The current implementation of "C" is working like "undo" on a word processor. Backing out of a transaction.

This is somewhat unexpected, and I'd like some input from design as to exactly how C should behave.

Currently (11 April, daily image):-

Press 2 + 2 =

Screen shows:-

  2
+ 2
---
  4

When you press "C" the display changes to:-

  2
+ 2

On a traditional calculator the C key usually clears what is on display, it doesn't undo the last transaction. Can design weigh in and give us some guidance on what it "should" do?

Revision history for this message
Riccardo Ferrazzo (f-riccardo87) wrote :

I think that the current implementation isn't so wrong because if a user hits equal more than once by mistake, it can revert the error pressing C.

Changed in ubuntu-ux:
assignee: nobody → Calum Pringle (calumpringle)
status: New → Triaged
importance: Undecided → High
assignee: Calum Pringle (calumpringle) → Christina Li (christina-li)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :

Fix committed into lp:ubuntu-calculator-app at revision 47, scheduled for release in ubuntu-calculator-app, milestone alpha-1

Changed in ubuntu-calculator-app:
status: New → Fix Committed
Revision history for this message
Christina Li (christina-li) wrote :

When you have already hit the equals sign, then the 'C' button should change to 'AC' (all clear), and it should clear the whole calculation as is in the traditional calculator.

For example,
2
+2
---
4

'AC' resets to '0'

If it's before pressing the equals sign, and the screen is:

2
+2

Then pressing 'C' would clear '2'.

Dalius (dalius-sandbox)
Changed in ubuntu-calculator-app:
status: Fix Committed → Fix Released
John Lea (johnlea)
Changed in ubuntu-ux:
status: Triaged → Fix Committed
Changed in ubuntu-ux:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.