answered
**
2016-02-12 11:46:11 +0300
**

Not really a proper fix, but anyway, it allows to do calculations without copying result by hand. Here is a patch that circumvents the bug in `DeclarativeField::link()`

proprietary function. When a fraction is used, the denominator is copied instead of being linked.

--- CalculationsListView.qml 2015-09-05 00:28:38.000000000 +0200
+++ CalculationsListView.qml.new 2016-02-12 10:33:55.367393552 +0100
@@ -110,7 +110,7 @@
linkText: calculation.result.linkText
coverMode: calculationsListView.coverMode
- onClicked: activeCalculation.focusField.link(calculation.result)
+ onClicked: activeCalculation.focusField.fraction ? activeCalculation.insert(calculation.result.valueText) : activeCalculation.focusField.link(calculation.result)
}
}
}

The proper fix would be to change the proprietary function to asign the `DeclarativeResult`

to the denominator when `DeclarativeField::fraction`

is `true`

.

This is still not working in 1.0.5.16. All other operand are working properly though. It looks like because division is treated as a block by itself., whereas other operations generate new blocks.

Damien Caliste ( 2014-04-16 10:50:32 +0300 )editYes, can confirm it on Tahkalampi 1.0.8.21

anandrkris ( 2014-12-09 11:53:04 +0300 )editYes, can confirm it also on 1.1.1.27 :)

anandrkris ( 2015-02-03 18:38:07 +0300 )editWhen I just tried it this happened:

100 / 5 = 20 1 / [press on result] [denominator shifts to numerator position] 20 / 0 = infinity

So, when I enter 1 / the previous result, the previous result is actually shifted from the place of the denominator to the place of the numerator. The previous numerator disappears altogether and the new denominator is zero.

bilgy_no1 ( 2015-05-24 11:44:11 +0300 )editStill exists on 1.1.6.27

AliN ( 2015-06-24 20:25:37 +0300 )edit