Fix for Issue 869

This excludes the local and avatar entities from what is returns by Entities.getChildrenIDs
to avoid the selection tools of the Zone entities to be considered as Children of it.
This was necessary for the display of the hierarchy status, but also for the "Add Children to Selection".
This commit is contained in:
Alezia Kurdis 2020-11-18 23:15:23 -05:00 committed by GitHub
parent 031b3985b0
commit 22abf1c2c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -724,12 +724,12 @@ SelectionManager = (function() {
that.addChildrenToSelection = function() {
if (that.hasSelection()) {
for (var i = 0; i < that.selections.length; i++) {
var childrenIDs = Entities.getChildrenIDs(that.selections[i]);
var collectNewChildren;
var childrenIDs = getDomainOnlyChildrenIDs(that.selections[i]);
var collectNewChildren;
var j;
var k = 0;
do {
collectNewChildren = Entities.getChildrenIDs(childrenIDs[k]);
collectNewChildren = getDomainOnlyChildrenIDs(childrenIDs[k]);
if (collectNewChildren.length > 0) {
for (j = 0; j < collectNewChildren.length; j++) {
childrenIDs.push(collectNewChildren[j]);
@ -746,7 +746,7 @@ SelectionManager = (function() {
that._update(true, this);
} else {
audioFeedback.rejection();
Window.notifyEditError("You have nothing selected.");
Window.notifyEditError("You have nothing selected.");
}
};
@ -832,7 +832,7 @@ SelectionDisplay = (function() {
const BOUNDING_EDGE_OFFSET = 0.5;
const DUPLICATOR_OFFSET = { x: 0.6, y: 0, z: 0.6 };
const DUPLICATOR_OFFSET = { x: 0.6, y: 0, z: 0.6 };
const CTRL_KEY_CODE = 16777249;