mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-29 09:39:55 +02:00
eliminate binding loop which could lead to not updating spinbox UI
This commit is contained in:
parent
168584169c
commit
4716be01f6
1 changed files with 6 additions and 2 deletions
|
@ -58,10 +58,14 @@ SpinBox {
|
||||||
|
|
||||||
onValueModified: realValue = value/factor
|
onValueModified: realValue = value/factor
|
||||||
onValueChanged: realValue = value/factor
|
onValueChanged: realValue = value/factor
|
||||||
|
onRealValueChanged: {
|
||||||
|
var newValue = Math.round(realValue*factor);
|
||||||
|
if(value != newValue) {
|
||||||
|
value = newValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stepSize: realStepSize*factor
|
stepSize: realStepSize*factor
|
||||||
value: Math.round(realValue*factor)
|
|
||||||
|
|
||||||
to : realTo*factor
|
to : realTo*factor
|
||||||
from : realFrom*factor
|
from : realFrom*factor
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue