mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-23 13:44:36 +02:00
Merge pull request #13351 from ctrlaltdavid/21891
Fix Avatar > Attachments joint and spinboxes
This commit is contained in:
commit
f2d6d0ee56
2 changed files with 5 additions and 4 deletions
|
@ -35,8 +35,8 @@ SpinBox {
|
||||||
property real maximumValue: 0.0
|
property real maximumValue: 0.0
|
||||||
|
|
||||||
property real realValue: 0.0
|
property real realValue: 0.0
|
||||||
property real realFrom: 0.0
|
property real realFrom: minimumValue
|
||||||
property real realTo: 100.0
|
property real realTo: maximumValue
|
||||||
property real realStepSize: 1.0
|
property real realStepSize: 1.0
|
||||||
|
|
||||||
signal editingFinished()
|
signal editingFinished()
|
||||||
|
@ -86,6 +86,7 @@ SpinBox {
|
||||||
}
|
}
|
||||||
|
|
||||||
valueFromText: function(text, locale) {
|
valueFromText: function(text, locale) {
|
||||||
|
spinBox.value = 0; // Force valueChanged signal to be emitted so that validator fires.
|
||||||
return Number.fromLocaleString(locale, text)*factor;
|
return Number.fromLocaleString(locale, text)*factor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -119,8 +119,8 @@ Item {
|
||||||
colorScheme: hifi.colorSchemes.dark
|
colorScheme: hifi.colorSchemes.dark
|
||||||
currentIndex: attachment ? model.indexOf(attachment.jointName) : -1
|
currentIndex: attachment ? model.indexOf(attachment.jointName) : -1
|
||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: {
|
||||||
if (completed && attachment && currentIndex != -1 && currentText && currentText !== attachment.jointName) {
|
if (completed && attachment && currentIndex != -1 && attachment.jointName !== model[currentIndex]) {
|
||||||
attachment.jointName = currentText;
|
attachment.jointName = model[currentIndex];
|
||||||
updateAttachment();
|
updateAttachment();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue