mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 17:30:01 +02:00
Merge pull request #11919 from ElderOrb/FB9706
9706 Editing Attachments Results In Attachments Window Scrolling To Top
This commit is contained in:
commit
eda63e5758
1 changed files with 16 additions and 5 deletions
|
@ -26,6 +26,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
id: onAttachmentsChangedConnection
|
||||||
target: MyAvatar
|
target: MyAvatar
|
||||||
onAttachmentsChanged: reload()
|
onAttachmentsChanged: reload()
|
||||||
}
|
}
|
||||||
|
@ -34,6 +35,12 @@ Item {
|
||||||
reload()
|
reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setAttachmentsVariant(attachments) {
|
||||||
|
onAttachmentsChangedConnection.enabled = false;
|
||||||
|
MyAvatar.setAttachmentsVariant(attachments);
|
||||||
|
onAttachmentsChangedConnection.enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
width: pane.width
|
width: pane.width
|
||||||
|
|
||||||
|
@ -92,11 +99,15 @@ Item {
|
||||||
attachments.splice(index, 1);
|
attachments.splice(index, 1);
|
||||||
listView.model.remove(index, 1);
|
listView.model.remove(index, 1);
|
||||||
}
|
}
|
||||||
onUpdateAttachment: MyAvatar.setAttachmentsVariant(attachments);
|
onUpdateAttachment: {
|
||||||
|
setAttachmentsVariant(attachments);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onCountChanged: MyAvatar.setAttachmentsVariant(attachments);
|
onCountChanged: {
|
||||||
|
setAttachmentsVariant(attachments);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// DEBUG
|
// DEBUG
|
||||||
|
@ -220,7 +231,7 @@ Item {
|
||||||
};
|
};
|
||||||
attachments.push(template);
|
attachments.push(template);
|
||||||
listView.model.append({});
|
listView.model.append({});
|
||||||
MyAvatar.setAttachmentsVariant(attachments);
|
setAttachmentsVariant(attachments);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,7 +261,7 @@ Item {
|
||||||
id: cancelAction
|
id: cancelAction
|
||||||
text: "Cancel"
|
text: "Cancel"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
MyAvatar.setAttachmentsVariant(originalAttachments);
|
setAttachmentsVariant(originalAttachments);
|
||||||
closeDialog();
|
closeDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -263,7 +274,7 @@ Item {
|
||||||
console.log("Attachment " + i + ": " + attachments[i]);
|
console.log("Attachment " + i + ": " + attachments[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
MyAvatar.setAttachmentsVariant(attachments);
|
setAttachmentsVariant(attachments);
|
||||||
closeDialog();
|
closeDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue