Merge pull request #13351 from ctrlaltdavid/21891

Fix Avatar > Attachments joint and spinboxes
This commit is contained in:
Anthony Thibault 2018-06-14 11:31:04 -07:00 committed by GitHub
commit f2d6d0ee56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View file

@ -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;
} }

View file

@ -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();
} }
} }