From 38e15b62085f8528fd4012aeba4127585379a335 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Tue, 10 Nov 2020 22:51:32 -0500 Subject: [PATCH] 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. --- scripts/system/create/entityList/html/js/entityList.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/system/create/entityList/html/js/entityList.js b/scripts/system/create/entityList/html/js/entityList.js index c0b28532cb..bb84f35d6d 100644 --- a/scripts/system/create/entityList/html/js/entityList.js +++ b/scripts/system/create/entityList/html/js/entityList.js @@ -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;