mirror of
https://github.com/overte-org/overte.git
synced 2025-04-15 19:39:20 +02:00
Merge pull request #8401 from ctrlaltdavid/21026
Fix crash when adding new attachment
This commit is contained in:
commit
7503a495fd
2 changed files with 4 additions and 2 deletions
|
@ -24,6 +24,7 @@ Item {
|
|||
Rectangle { color: hifi.colors.baseGray; anchors.fill: parent; radius: 4 }
|
||||
|
||||
Component.onCompleted: {
|
||||
jointChooser.model = MyAvatar.jointNames;
|
||||
completed = true;
|
||||
}
|
||||
|
||||
|
@ -82,7 +83,6 @@ Item {
|
|||
HifiControls.ComboBox {
|
||||
id: jointChooser;
|
||||
anchors { bottom: parent.bottom; left: parent.left; right: parent.right }
|
||||
model: MyAvatar.jointNames
|
||||
colorScheme: hifi.colorSchemes.dark
|
||||
currentIndex: attachment ? model.indexOf(attachment.jointName) : -1
|
||||
onCurrentIndexChanged: {
|
||||
|
|
|
@ -1638,7 +1638,9 @@ void AvatarData::setAttachmentsVariant(const QVariantList& variant) {
|
|||
for (const auto& attachmentVar : variant) {
|
||||
AttachmentData attachment;
|
||||
attachment.fromVariant(attachmentVar);
|
||||
newAttachments.append(attachment);
|
||||
if (!attachment.modelURL.isEmpty()) {
|
||||
newAttachments.append(attachment);
|
||||
}
|
||||
}
|
||||
setAttachmentData(newAttachments);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue