diff --git a/scripts/system/create/edit.js b/scripts/system/create/edit.js index 35bcd45786..69e2e94818 100644 --- a/scripts/system/create/edit.js +++ b/scripts/system/create/edit.js @@ -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."); } }