Commit 67a969b7 authored by Oleg Popkov's avatar Oleg Popkov Committed by Maximilian Schiller
Browse files

Set the onlyUpdateOperation flag in a saner place

BUG 419775

For some reason, CalcEngine::setOnlyUpdateOperation(true) was called
whenever the display was updated "from core", which also happens in
case of unary operations, thereby skipping them.
parent cf39d29d
......@@ -2127,7 +2127,6 @@ void KCalculator::updateDisplay(UpdateFlags flags) {
if(flags & UPDATE_FROM_CORE) {
calc_display->updateFromCore(core, (flags & UPDATE_STORE_RESULT) != 0);
core.setOnlyUpdateOperation(true);
} else {
calc_display->update();
}
......
......@@ -872,6 +872,10 @@ void CalcEngine::enterOperation(const KNumber &number, Operation func)
else
stack_.push(tmp_node);
// The check for '=' or '%' is unnecessary; it is just a safety measure
if (!((func == FUNC_EQUAL) || (func == FUNC_PERCENT)))
setOnlyUpdateOperation(true);
evalStack();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment