Bug fix: CTRL-Click was inverting the selection.

Bug fix: EntityList, CTRL-Click was adding the last selected entity as the first selection the selection stack. The first selected item was systematically the last item of the selection. This was causing unpredictable results with "Parent Entities To The Last Selected". (This bug becomes evident by highlighting the "Last Selected" in the entity list.
This commit is contained in:
Alezia Kurdis 2020-11-10 22:51:32 -05:00 committed by GitHub
parent 1167ce7a1c
commit 38e15b6208
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -770,10 +770,10 @@ function loaded() {
let selectedIndex = selectedEntities.indexOf(entityID);
if (selectedIndex >= 0) {
selection = [];
selection = selection.concat(selectedEntities);
selection = selectedEntities.concat(selection);
selection.splice(selectedIndex, 1);
} else {
selection = selection.concat(selectedEntities);
selection = selectedEntities.concat(selection);
}
} else if (clickEvent.shiftKey && selectedEntities.length > 0) {
let previousItemFound = -1;