Bug 489043 - Pressing numeric key or . after pressing Enter/= should start a new expression
Summary: Pressing numeric key or . after pressing Enter/= should start a new expression
Status: RESOLVED FIXED
Alias: None
Product: kcalc
Classification: Applications
Component: general (show other bugs)
Version: 24.05.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Gabriel Barrantes
URL:
Keywords: regression
: 490722 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-06-23 11:53 UTC by popov895
Modified: 2024-07-26 19:27 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description popov895 2024-06-23 11:53:54 UTC
SUMMARY

Until 24.05.0, pressing any number key or the . after pressing Enter/= started a new expression - the current value was replaced by the value you entered. Since 24.05.0, the same action results in the entered value being appended to the current value, so to start a new expression, you need to press Esc/C/CA. It would be nice to bring back the previous behavior.

STEPS TO REPRODUCE

1. Enter 55*2 - input field contains 55*2, display field contains 110
2. Press Enter - input field contains 110, display field is empty
3. Enter 33 - display field is empty, but input field contains 11033 instead of 33

SOFTWARE/OS VERSIONS

Operating System: openSUSE Tumbleweed 20240618
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.3.0
KDE Gear Version: 24.05.1
Qt Version: 6.7.1
Comment 1 fanzhuyifan 2024-06-24 01:47:48 UTC
Can reproduce on master.
Comment 2 Bug Janitor Service 2024-06-26 02:22:58 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kcalc/-/merge_requests/110
Comment 3 Gabriel Barrantes 2024-07-04 22:12:56 UTC
Git commit e8152271ad76535caafe07f693550e8219238fb3 by Gabriel Barrantes.
Committed on 04/07/2024 at 21:09.
Pushed by gabrielbarrantes into branch 'master'.

Start new input on numeric entries after "equal"

Clear input display after a result has been moved to the input display
when entering a digit or decimal point.

M  +13   -3    kcalc.cpp
M  +1    -0    kcalc.h
M  +28   -11   kcalc_input_display.cpp
M  +4    -3    kcalc_input_display.h

https://invent.kde.org/utilities/kcalc/-/commit/e8152271ad76535caafe07f693550e8219238fb3
Comment 4 Gabriel Barrantes 2024-07-23 18:30:23 UTC
*** Bug 490722 has been marked as a duplicate of this bug. ***