Bug 485307

Summary: KCalc M+ button repeats last operation before adding to memory.
Product: [Applications] kcalc Reporter: cleitner
Component: generalAssignee: Gabriel Barrantes <gabriel.barrantes.dev>
Status: RESOLVED NOT A BUG    
Severity: major CC: gabriel.barrantes.dev
Priority: NOR    
Version First Reported In: 21.12.3   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description cleitner 2024-04-10 06:26:59 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
KCalc M+ button repeats last operation before adding to memory.

STEPS TO REPRODUCE
1. 2 * 2 = (display now shows 4)
2. M+ (Display now shows 8)
3. MR
4. Memory stored value of 8

OBSERVED RESULT
Memory stores value after repeating operation

EXPECTED RESULT
Memory Store button stores currently displayed value, not repeating last operation (same as pressing equals button).

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: all
(available in About System)
KDE Plasma Version: all
KDE Frameworks Version: all
Qt Version: all

ADDITIONAL INFORMATION
Is this a feature? I suppose I could just not press equals before M+.
Comment 1 Gabriel Barrantes 2024-06-07 19:09:48 UTC
Yes, it is an intended feature, doing the operation to store the result is unavoidable so prior to storing the calculation it gets done without the need to press "=". However the behavior might change slightly in future versions.