Bug 108473 - Repeated press of equals sign does not repeat last calculation
Summary: Repeated press of equals sign does not repeat last calculation
Status: RESOLVED FIXED
Alias: None
Product: kcalc
Classification: Applications
Component: general (show other bugs)
Version: 1.8.1
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: Evan Teran
URL:
Keywords: junior-jobs, usability
: 185457 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-03 05:40 UTC by David Bowen
Modified: 2021-04-08 18:06 UTC (History)
3 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 David Bowen 2005-07-03 05:40:11 UTC
Version:           1.8.1 (using KDE KDE 3.4.1)
Installed from:    Fedora RPMs
OS:                Linux

On some old fashioned real world calculators I've used the last calculation gets repeated each time I hit the equals sign. This is useful if you're converting from bytes to MB for example as you can just do "/1024" and hit equals twice. kcalc doesn't seem to do this and I'm not sure why - I suspect I'm missing something obvious here.
Comment 1 Rolf Viehmann 2005-07-14 18:47:28 UTC
Well, I'm not sure if you are missing something or not, but I also think this would be a good idea, easy to implement and useful. Also there could be a menu entry "repeat last operation" (with exactly the same function).
Comment 2 Jonathan Marten 2009-03-12 17:42:58 UTC
*** Bug 185457 has been marked as a duplicate of this bug. ***
Comment 3 jeremy9856 2015-05-28 22:24:29 UTC
I think it's a good idea to add this behavior but there have to be an option to disable it if needed
Comment 4 Christoph Feck 2018-08-16 22:28:23 UTC
Git commit 0c4c775b9dd36c3a93a707f28ff15232165b301a by Christoph Feck, on behalf of Maximilian Schiller.
Committed on 16/08/2018 at 22:26.
Pushed by cfeck into branch 'master'.

Repeat last action when pressing "=" or Enter

This patch allows to press the equal sign again in order to repeat
the last action again.

For example "5+10" yields "15" on Enter and if you press Enter or
equal sign again it repeats the "+ 10" by showing you "25" now.

This behavior is disabled by default and can be turned on in
KCalc's settings panel under "Misc".

Differential Revision: https://phabricator.kde.org/D12099

M  +10   -0    general.ui
M  +4    -0    kcalc.kcfg
M  +25   -1    kcalc_core.cpp
M  +4    -0    kcalc_core.h

https://commits.kde.org/kcalc/0c4c775b9dd36c3a93a707f28ff15232165b301a
Comment 5 David Bowen 2021-04-08 18:06:46 UTC
Thank you, it works as described and the setting is persisted so it keeps working the way I enjoy.