Merge pull request #11919 from ElderOrb/FB9706

9706 Editing Attachments Results In Attachments Window Scrolling To Top
This commit is contained in:
Seth Alves 2017-12-08 07:01:00 -08:00 committed by GitHub
commit eda63e5758
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,6 +26,7 @@ Item {
}
Connections {
id: onAttachmentsChangedConnection
target: MyAvatar
onAttachmentsChanged: reload()
}
@ -34,6 +35,12 @@ Item {
reload()
}
function setAttachmentsVariant(attachments) {
onAttachmentsChangedConnection.enabled = false;
MyAvatar.setAttachmentsVariant(attachments);
onAttachmentsChangedConnection.enabled = true;
}
Column {
width: pane.width
@ -92,11 +99,15 @@ Item {
attachments.splice(index, 1);
listView.model.remove(index, 1);
}
onUpdateAttachment: MyAvatar.setAttachmentsVariant(attachments);
onUpdateAttachment: {
setAttachmentsVariant(attachments);
}
}
}
onCountChanged: MyAvatar.setAttachmentsVariant(attachments);
onCountChanged: {
setAttachmentsVariant(attachments);
}
/*
// DEBUG
@ -220,7 +231,7 @@ Item {
};
attachments.push(template);
listView.model.append({});
MyAvatar.setAttachmentsVariant(attachments);
setAttachmentsVariant(attachments);
}
}
@ -250,7 +261,7 @@ Item {
id: cancelAction
text: "Cancel"
onTriggered: {
MyAvatar.setAttachmentsVariant(originalAttachments);
setAttachmentsVariant(originalAttachments);
closeDialog();
}
}
@ -263,7 +274,7 @@ Item {
console.log("Attachment " + i + ": " + attachments[i]);
}
MyAvatar.setAttachmentsVariant(attachments);
setAttachmentsVariant(attachments);
closeDialog();
}
}