mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 12:23:24 +02:00
Fix deletion with multi-selection
This commit is contained in:
parent
078d14ae58
commit
5b9806dc0d
2 changed files with 6 additions and 3 deletions
|
@ -927,7 +927,7 @@ SelectionDisplay = (function () {
|
|||
};
|
||||
|
||||
that.updateHandles = function(entityID) {
|
||||
if (!entitySelected) {
|
||||
if (SelectionManager.selections.length == 0) {
|
||||
that.setOverlaysVisible(false);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -608,9 +608,12 @@ function handeMenuEvent(menuItem) {
|
|||
} else if (menuItem == "Delete") {
|
||||
if (entitySelected) {
|
||||
print(" Delete Entity.... selectedEntityID="+ selectedEntityID);
|
||||
Entities.deleteEntity(selectedEntityID);
|
||||
for (var i = 0; i < selectionManager.selections.length; i++) {
|
||||
Entities.deleteEntity(selectionManager.selections[i]);
|
||||
}
|
||||
selectionDisplay.unselect(selectedEntityID);
|
||||
entitySelected = false;
|
||||
selectionManager.clearSelections();
|
||||
} else {
|
||||
print(" Delete Entity.... not holding...");
|
||||
}
|
||||
|
@ -653,7 +656,7 @@ Controller.keyReleaseEvent.connect(function (event) {
|
|||
if (event.text == "`") {
|
||||
handeMenuEvent("Edit Properties...");
|
||||
}
|
||||
if (event.text == "BACKSPACE") {
|
||||
if (event.text == "BACKSPACE" || event.text == "DELETE") {
|
||||
handeMenuEvent("Delete");
|
||||
} else if (event.text == "TAB") {
|
||||
selectionDisplay.toggleSpaceMode();
|
||||
|
|
Loading…
Reference in a new issue