mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 20:34:07 +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
|
||||
onValueChanged: realValue = value/factor
|
||||
onRealValueChanged: {
|
||||
var newValue = Math.round(realValue*factor);
|
||||
if(value != newValue) {
|
||||
value = newValue;
|
||||
}
|
||||
}
|
||||
|
||||
stepSize: realStepSize*factor
|
||||
value: Math.round(realValue*factor)
|
||||
|
||||
to : realTo*factor
|
||||
from : realFrom*factor
|
||||
|
||||
|
|
Loading…
Reference in a new issue