Bug 507195 - Decimal separator vanishes when deleting the numbers after the decimal separator
Summary: Decimal separator vanishes when deleting the numbers after the decimal separator
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (other bugs)
Version First Reported In: 5.2.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-18 12:53 UTC by Ingo Klöcker
Modified: 2025-07-19 12:41 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.2.1
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ingo Klöcker 2025-07-18 12:53:40 UTC
The decimal separator vanishes when I delete the numbers after the decimal separator with backspace. This is really inconvenient and dangerous if one only needs to change the numbers after the decimal separator when manually updating price of an investment. Usually, one removes the numbers after the decimal separator and then enters the new numbers. If one isn't attentive and doesn't notice that the decimal separator vanished then one accidentally enters a price which is 100 times to high.

I think this is a regression may related to Qt 6 because I never ran into this problem with KMyMoney 5.1.

STEPS TO REPRODUCE
1. Open Investments
2. Select an investment and choose Manual price update
3. Put cursor after the Price
4. Press backspace twice to remove the two number after the decimal separator

OBSERVED RESULT
The decimal separator vanishes when the last number after the decimal separator is removed. Example: The price is "62,67". Press backspace. Price input field contains "62,6". Press backspace again. Price input field contains "62".

EXPECTED RESULT
The decimal separator should no vanish.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE Tumbleweed (Xcb)
KDE Frameworks Version: 6.16
Qt Version: 6.9.1
Comment 1 Thomas Baumgart 2025-07-19 11:41:33 UTC
Git commit 8f4b3be50783ad6711efd0435fca0b1fb2c5b73e by Thomas Baumgart.
Committed on 19/07/2025 at 11:41.
Pushed by tbaumgart into branch 'master'.

Remove only characters selected by user

When modifying the text in the amount edit widget by using the backspace
or delete key it could happen that more than one character was removed.
This confuses the user, epsecially if the decimal symbol gets removed as
part of this.

This change ensures that only the characters selected by the user are
removed.
FIXED-IN: 5.2.1

M  +36   -5    kmymoney/widgets/amountedit.cpp

https://invent.kde.org/office/kmymoney/-/commit/8f4b3be50783ad6711efd0435fca0b1fb2c5b73e
Comment 2 Thomas Baumgart 2025-07-19 12:41:58 UTC
Git commit 2ebb2bd6b50d1c08b252b19817a15d12429a8529 by Thomas Baumgart.
Committed on 19/07/2025 at 11:44.
Pushed by tbaumgart into branch '5.2'.

Remove only characters selected by user

When modifying the text in the amount edit widget by using the backspace
or delete key it could happen that more than one character was removed.
This confuses the user, epsecially if the decimal symbol gets removed as
part of this.

This change ensures that only the characters selected by the user are
removed.
FIXED-IN: 5.2.1
(cherry picked from commit 8f4b3be50783ad6711efd0435fca0b1fb2c5b73e)

M  +36   -5    kmymoney/widgets/amountedit.cpp

https://invent.kde.org/office/kmymoney/-/commit/2ebb2bd6b50d1c08b252b19817a15d12429a8529