mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-03 16:38:52 +02:00
Don't remove entities from list when try to delete locked entity
This commit is contained in:
parent
40baca6ee1
commit
ad661cb345
1 changed files with 21 additions and 16 deletions
|
@ -1424,6 +1424,7 @@ function deleteSelectedEntities() {
|
||||||
for (var i = 0; i < newSortedSelection.length; i++) {
|
for (var i = 0; i < newSortedSelection.length; i++) {
|
||||||
var entityID = newSortedSelection[i];
|
var entityID = newSortedSelection[i];
|
||||||
var initialProperties = SelectionManager.savedProperties[entityID];
|
var initialProperties = SelectionManager.savedProperties[entityID];
|
||||||
|
if (!initialProperties.locked) {
|
||||||
var children = Entities.getChildrenIDs(entityID);
|
var children = Entities.getChildrenIDs(entityID);
|
||||||
var childList = [];
|
var childList = [];
|
||||||
recursiveDelete(children, childList, deletedIDs);
|
recursiveDelete(children, childList, deletedIDs);
|
||||||
|
@ -1435,6 +1436,9 @@ function deleteSelectedEntities() {
|
||||||
deletedIDs.push(entityID);
|
deletedIDs.push(entityID);
|
||||||
Entities.deleteEntity(entityID);
|
Entities.deleteEntity(entityID);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (savedProperties.length > 0) {
|
||||||
SelectionManager.clearSelections();
|
SelectionManager.clearSelections();
|
||||||
pushCommandForSelections([], savedProperties);
|
pushCommandForSelections([], savedProperties);
|
||||||
|
|
||||||
|
@ -1444,6 +1448,7 @@ function deleteSelectedEntities() {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function toggleSelectedEntitiesLocked() {
|
function toggleSelectedEntitiesLocked() {
|
||||||
if (SelectionManager.hasSelection()) {
|
if (SelectionManager.hasSelection()) {
|
||||||
|
|
Loading…
Reference in a new issue