mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 18:30:42 +02:00
ensure selection of newly-added wearable always happens after pushing updated wearables list to UI
This commit is contained in:
parent
9304d6c5c4
commit
ce6c8c72f5
1 changed files with 5 additions and 3 deletions
|
@ -72,12 +72,15 @@ function getMyAvatarSettings() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateAvatarWearables(avatar, bookmarkAvatarName) {
|
function updateAvatarWearables(avatar, bookmarkAvatarName, callback) {
|
||||||
executeLater(function() {
|
executeLater(function() {
|
||||||
var wearables = getMyAvatarWearables();
|
var wearables = getMyAvatarWearables();
|
||||||
avatar[ENTRY_AVATAR_ENTITIES] = wearables;
|
avatar[ENTRY_AVATAR_ENTITIES] = wearables;
|
||||||
|
|
||||||
sendToQml({'method' : 'wearablesUpdated', 'wearables' : wearables, 'avatarName' : bookmarkAvatarName})
|
sendToQml({'method' : 'wearablesUpdated', 'wearables' : wearables, 'avatarName' : bookmarkAvatarName})
|
||||||
|
|
||||||
|
if(callback)
|
||||||
|
callback();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,8 +260,7 @@ function fromQml(message) { // messages are {method, params}, like json-rpc. See
|
||||||
};
|
};
|
||||||
|
|
||||||
var entityID = Entities.addEntity(properties, true);
|
var entityID = Entities.addEntity(properties, true);
|
||||||
updateAvatarWearables(currentAvatar, message.avatarName);
|
updateAvatarWearables(currentAvatar, message.avatarName, function() {
|
||||||
executeLater(function() {
|
|
||||||
onSelectedEntity(entityID);
|
onSelectedEntity(entityID);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue