mirror of
https://github.com/overte-org/overte.git
synced 2025-04-13 18:42:11 +02:00
Merge pull request #14041 from huffman/fix/entity-list-no-highlight-74
Fix entity list selection failing when selecting entities not in list
This commit is contained in:
commit
9916496118
1 changed files with 10 additions and 4 deletions
|
@ -164,7 +164,10 @@ function loaded() {
|
|||
|
||||
selectedEntities.forEach(function(entityID) {
|
||||
if (selection.indexOf(entityID) === -1) {
|
||||
entitiesByID[entityID].el.className = '';
|
||||
let entity = entitiesByID[entityID];
|
||||
if (entity !== undefined) {
|
||||
entity.el.className = '';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -388,15 +391,18 @@ function loaded() {
|
|||
let notFound = false;
|
||||
|
||||
selectedEntities.forEach(function(id) {
|
||||
entitiesByID[id].el.className = '';
|
||||
let entity = entitiesByID[id];
|
||||
if (entity !== undefined) {
|
||||
entity.el.className = '';
|
||||
}
|
||||
});
|
||||
|
||||
selectedEntities = [];
|
||||
for (let i = 0; i < selectedIDs.length; i++) {
|
||||
let id = selectedIDs[i];
|
||||
selectedEntities.push(id);
|
||||
if (id in entitiesByID) {
|
||||
let entity = entitiesByID[id];
|
||||
let entity = entitiesByID[id];
|
||||
if (entity !== undefined) {
|
||||
entity.el.className = 'selected';
|
||||
} else {
|
||||
notFound = true;
|
||||
|
|
Loading…
Reference in a new issue