mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 12:08:54 +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) {
|
that.updateHandles = function(entityID) {
|
||||||
if (!entitySelected) {
|
if (SelectionManager.selections.length == 0) {
|
||||||
that.setOverlaysVisible(false);
|
that.setOverlaysVisible(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -608,9 +608,12 @@ function handeMenuEvent(menuItem) {
|
||||||
} else if (menuItem == "Delete") {
|
} else if (menuItem == "Delete") {
|
||||||
if (entitySelected) {
|
if (entitySelected) {
|
||||||
print(" Delete Entity.... selectedEntityID="+ selectedEntityID);
|
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);
|
selectionDisplay.unselect(selectedEntityID);
|
||||||
entitySelected = false;
|
entitySelected = false;
|
||||||
|
selectionManager.clearSelections();
|
||||||
} else {
|
} else {
|
||||||
print(" Delete Entity.... not holding...");
|
print(" Delete Entity.... not holding...");
|
||||||
}
|
}
|
||||||
|
@ -653,7 +656,7 @@ Controller.keyReleaseEvent.connect(function (event) {
|
||||||
if (event.text == "`") {
|
if (event.text == "`") {
|
||||||
handeMenuEvent("Edit Properties...");
|
handeMenuEvent("Edit Properties...");
|
||||||
}
|
}
|
||||||
if (event.text == "BACKSPACE") {
|
if (event.text == "BACKSPACE" || event.text == "DELETE") {
|
||||||
handeMenuEvent("Delete");
|
handeMenuEvent("Delete");
|
||||||
} else if (event.text == "TAB") {
|
} else if (event.text == "TAB") {
|
||||||
selectionDisplay.toggleSpaceMode();
|
selectionDisplay.toggleSpaceMode();
|
||||||
|
|
Loading…
Reference in a new issue