https://bugs.kde.org/show_bug.cgi?id=412401
Maximilian Schiller <manim...@outlook.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|CONFIRMED |RESOLVED Latest Commit| |https://invent.kde.org/util | |ities/kcalc/commit/cf39d29d | |737f7787350b04216c64a22a0b9 | |36af6 --- Comment #4 from Maximilian Schiller <manim...@outlook.de> --- Git commit cf39d29d737f7787350b04216c64a22a0b936af6 by Maximilian Schiller, on behalf of Oleg Popkov. Committed on 07/06/2020 at 08:00. Pushed by mschiller into branch 'master'. Fix chained operations involving inserted numbers In brief, KCalc uses a stack in `CalcEngine` for both numbers and operations in order to ensure the correct operation evaluation order (such that `2 + 2 * 2 = 6`) and support parentheses. Operations are pushed along with currently displayed numerical values. KCalc also checks whether it should push the operation onto the stack or just replace a pushed one with the new one without changing the associated number (so that `5 + - 3 = 2`), and for this it uses a flag changed by calling the `CalcEngine::setOnlyUpdateOperation` method. Obviously, this flag must be cleared after a number is entered by any method, but it only happens if a number is entered manually. As a result, inserting a number as a whole, whether as a constant or by pasting from the clipboard, results in replacing the preceding operation with the succeeding one without storing the number in question, unless the succeeding operation is `=` or `%`. M +19 -1 kcalc.cpp M +2 -0 kcalc.h https://invent.kde.org/utilities/kcalc/commit/cf39d29d737f7787350b04216c64a22a0b936af6 -- You are receiving this mail because: You are watching all bug changes.