Bug 431331 - Repeat Operation setting causes Memory Store key to store wrong result
Summary: Repeat Operation setting causes Memory Store key to store wrong result
Status: RESOLVED FIXED
Alias: None
Product: kcalc
Classification: Applications
Component: general (show other bugs)
Version: 19.12
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Evan Teran
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-08 20:37 UTC by cleitner
Modified: 2021-12-09 16:13 UTC (History)
1 user (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 cleitner 2021-01-08 20:37:12 UTC
SUMMARY


STEPS TO REPRODUCE
1. Enable "Repeat Operation for each Result" in Misc settings
2. Perform a calculation
3. Click the Memory Store key (MS)

OBSERVED RESULT
The value stored in memory has the last operation repeated an extra time.

EXPECTED RESULT
The value stored should be whatever is displayed, and the display should not change.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Kubuntu 20.04
(available in About System)
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2021-01-09 12:09:00 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kcalc/-/merge_requests/10
Comment 2 Albert Astals Cid 2021-05-25 21:01:45 UTC
Git commit 912617024a92b0dd1a07c8de13e2c5017ee75c30 by Albert Astals Cid, on behalf of Maximilian Schiller.
Committed on 25/05/2021 at 21:01.
Pushed by aacid into branch 'master'.

Fix repeat operation caused by memory store

In order to do the store memory operation the stack has to
be evaluated by a EnterEqual() operation which would cause
a repeat of the last operation.

This introduces a argument to inhibit this behavior in undesireable
places.

M  +3    -3    kcalc.cpp
M  +2    -1    kcalc.h
M  +2    -2    kcalc_core.cpp
M  +6    -1    kcalc_core.h

https://invent.kde.org/utilities/kcalc/commit/912617024a92b0dd1a07c8de13e2c5017ee75c30
Comment 3 Albert Astals Cid 2021-12-09 16:13:52 UTC
Git commit 265748bfc8d5ad5e912cb494f5b1399c638b7921 by Albert Astals Cid, on behalf of Maximilian Schiller.
Committed on 25/05/2021 at 20:58.
Pushed by aacid into branch 'mr/10'.

Fix repeat operation caused by memory store

In order to do the store memory operation the stack has to
be evaluated by a EnterEqual() operation which would cause
a repeat of the last operation.

This introduces a argument to inhibit this behavior in undesireable
places.

M  +3    -3    kcalc.cpp
M  +1    -1    kcalc.h
M  +2    -2    kcalc_core.cpp
M  +1    -1    kcalc_core.h

https://invent.kde.org/utilities/kcalc/commit/265748bfc8d5ad5e912cb494f5b1399c638b7921