mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 03:13:09 +02:00
Add Parent-Children Selector group
Add Parent-Children Selector group Prevent action to happen when some entities are Locked in the Selection Code Adjustments
This commit is contained in:
parent
6f6e41658c
commit
5b0a00a81a
1 changed files with 8 additions and 5 deletions
|
@ -1696,7 +1696,7 @@ function recursiveDelete(entities, childrenList, deletedIDs, entityHostType) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function unparentSelectedEntities() {
|
function unparentSelectedEntities() {
|
||||||
if (SelectionManager.hasSelection()) {
|
if (SelectionManager.hasSelection() && SelectionManager.hasUnlockedSelection()) {
|
||||||
var selectedEntities = selectionManager.selections;
|
var selectedEntities = selectionManager.selections;
|
||||||
var parentCheck = false;
|
var parentCheck = false;
|
||||||
|
|
||||||
|
@ -1733,11 +1733,11 @@ function unparentSelectedEntities() {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
audioFeedback.rejection();
|
audioFeedback.rejection();
|
||||||
Window.notifyEditError("You have nothing selected to unparent");
|
Window.notifyEditError("You have nothing selected or the selection has locked entities.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function parentSelectedEntities() {
|
function parentSelectedEntities() {
|
||||||
if (SelectionManager.hasSelection()) {
|
if (SelectionManager.hasSelection() && SelectionManager.hasUnlockedSelection()) {
|
||||||
var selectedEntities = selectionManager.selections;
|
var selectedEntities = selectionManager.selections;
|
||||||
if (selectedEntities.length <= 1) {
|
if (selectedEntities.length <= 1) {
|
||||||
audioFeedback.rejection();
|
audioFeedback.rejection();
|
||||||
|
@ -1768,11 +1768,11 @@ function parentSelectedEntities() {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
audioFeedback.rejection();
|
audioFeedback.rejection();
|
||||||
Window.notifyEditError("You have nothing selected to parent");
|
Window.notifyEditError("You have nothing selected or the selection has locked entities.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function deleteSelectedEntities() {
|
function deleteSelectedEntities() {
|
||||||
if (SelectionManager.hasSelection()) {
|
if (SelectionManager.hasSelection() && SelectionManager.hasUnlockedSelection()) {
|
||||||
var deletedIDs = [];
|
var deletedIDs = [];
|
||||||
|
|
||||||
SelectionManager.saveProperties();
|
SelectionManager.saveProperties();
|
||||||
|
@ -1803,6 +1803,9 @@ function deleteSelectedEntities() {
|
||||||
pushCommandForSelections([], savedProperties);
|
pushCommandForSelections([], savedProperties);
|
||||||
entityListTool.deleteEntities(deletedIDs);
|
entityListTool.deleteEntities(deletedIDs);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
audioFeedback.rejection();
|
||||||
|
Window.notifyEditError("You have nothing selected or the selection has locked entities.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue