mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 19:55:07 +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() {
|
||||
if (SelectionManager.hasSelection()) {
|
||||
if (SelectionManager.hasSelection() && SelectionManager.hasUnlockedSelection()) {
|
||||
var selectedEntities = selectionManager.selections;
|
||||
var parentCheck = false;
|
||||
|
||||
|
@ -1733,11 +1733,11 @@ function unparentSelectedEntities() {
|
|||
}
|
||||
} else {
|
||||
audioFeedback.rejection();
|
||||
Window.notifyEditError("You have nothing selected to unparent");
|
||||
Window.notifyEditError("You have nothing selected or the selection has locked entities.");
|
||||
}
|
||||
}
|
||||
function parentSelectedEntities() {
|
||||
if (SelectionManager.hasSelection()) {
|
||||
if (SelectionManager.hasSelection() && SelectionManager.hasUnlockedSelection()) {
|
||||
var selectedEntities = selectionManager.selections;
|
||||
if (selectedEntities.length <= 1) {
|
||||
audioFeedback.rejection();
|
||||
|
@ -1768,11 +1768,11 @@ function parentSelectedEntities() {
|
|||
}
|
||||
} else {
|
||||
audioFeedback.rejection();
|
||||
Window.notifyEditError("You have nothing selected to parent");
|
||||
Window.notifyEditError("You have nothing selected or the selection has locked entities.");
|
||||
}
|
||||
}
|
||||
function deleteSelectedEntities() {
|
||||
if (SelectionManager.hasSelection()) {
|
||||
if (SelectionManager.hasSelection() && SelectionManager.hasUnlockedSelection()) {
|
||||
var deletedIDs = [];
|
||||
|
||||
SelectionManager.saveProperties();
|
||||
|
@ -1803,6 +1803,9 @@ function deleteSelectedEntities() {
|
|||
pushCommandForSelections([], savedProperties);
|
||||
entityListTool.deleteEntities(deletedIDs);
|
||||
}
|
||||
} else {
|
||||
audioFeedback.rejection();
|
||||
Window.notifyEditError("You have nothing selected or the selection has locked entities.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue