Bug 389867 - Amount Input Changes Value Prematurely
Summary: Amount Input Changes Value Prematurely
Status: RESOLVED FIXED
Alias: None
Product: skrooge
Classification: Applications
Component: general (show other bugs)
Version: 2.10.0
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Guillaume DE BURE
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-04 11:34 UTC by Bob Stouffer
Modified: 2018-02-04 13:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bob Stouffer 2018-02-04 11:34:41 UTC
When inputting an amount for a transaction, I sometimes am copying that value from another window. If I am entering a transaction for $110.51, for example, I may write "110." in Skrooge's Amount field, and then switch to the other window to check how many cents to enter. When I come back, the decimal point at the end of my amount has been erased because Skrooge automatically cleans up entered values as soon as the Amount field looses focus. This also means if I enter an equation, such as 8.21 + 2.13, and I change focus after typing the plus sign, the Amount will be shown as a red error.

I have learned to work around this by not typing in the decimal sign or any trailing zeros if I know I will need to change focus, but it's not ideal.

Here are a few options that I feel would work better:

 * Turn off automatic changes to amounts, and show an error if  I try to save an operation where the amount cannot be recognized
 * Delay the automatic calculation of the Amount field until "Add" or "Modify" is pressed
 * Delay the automatic calculation of the Amount field until another field in Skrooge receives focus
 * Recognize values that may be incomplete and do not alter them. I'd be fine with them showing up as red like the incomplete equations.
Comment 1 Stephane MANKOWSKI 2018-02-04 13:04:31 UTC
Git commit c9d0c060aa06a9611b7eb1d02db423b0dc23a2e2 by Stephane MANKOWSKI.
Committed on 04/02/2018 at 13:03.
Pushed by smankowski into branch 'master'.

Amount Input Changes Value Prematurely

M  +1    -0    CHANGELOG
M  +3    -1    skgbasegui/skgcalculatoredit.cpp

https://commits.kde.org/skrooge/c9d0c060aa06a9611b7eb1d02db423b0dc23a2e2
Comment 2 Stephane MANKOWSKI 2018-02-04 13:06:18 UTC
The field will be computed only if the focus is lost inside the application.
No more when the focus is lost due to the system.