Fix Create app selection updating when entities are deleted

This commit is contained in:
David Rowe 2018-06-17 08:35:45 +12:00
parent 3c081c4bf8
commit e8154b5df1

View file

@ -475,19 +475,19 @@ var toolBar = (function () {
var DELETE_ENTITY_TIMER_TIMEOUT = 100;
function checkDeletedEntityAndUpdate(entityID) {
// Allow for multiple entity deletes before updating the entity list.
if (selectionManager.selections.indexOf(entityID) !== -1) {
// Allow for multiple entity deletes before updating the entities selected.
entitiesToDelete.push(entityID);
if (deletedEntityTimer !== null) {
Script.clearTimeout(deletedEntityTimer);
}
deletedEntityTimer = Script.setTimeout(function () {
selectionManager.removeEntities(entitiesToDelete);
entityListTool.clearEntityList();
entityListTool.sendUpdate();
entitiesToDelete = [];
deletedEntityTimer = null;
}, DELETE_ENTITY_TIMER_TIMEOUT);
}
}
function initialize() {
Script.scriptEnding.connect(cleanup);