mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
comply with copy/paste update
This commit is contained in:
parent
3fa4ee0e1d
commit
4e9f9b3edf
2 changed files with 9 additions and 9 deletions
|
@ -272,11 +272,11 @@ EntityListTool = function(shouldUseEditTabletApp) {
|
|||
} else if (data.type === "radius") {
|
||||
searchRadius = data.radius;
|
||||
} else if (data.type === "cut") {
|
||||
cutSelectedEntities();
|
||||
SelectionManager.cutSelectedEntities();
|
||||
} else if (data.type === "copy") {
|
||||
copySelectedEntities();
|
||||
SelectionManager.copySelectedEntities();
|
||||
} else if (data.type === "paste") {
|
||||
pasteEntities();
|
||||
SelectionManager.pasteEntities();
|
||||
} else if (data.type === "duplicate") {
|
||||
SelectionManager.duplicateSelection();
|
||||
that.sendUpdate();
|
||||
|
|
|
@ -353,12 +353,12 @@ SelectionManager = (function() {
|
|||
}
|
||||
|
||||
return createdEntityIDs;
|
||||
}
|
||||
};
|
||||
|
||||
that.cutSelectedEntities = function() {
|
||||
copySelectedEntities();
|
||||
that.copySelectedEntities();
|
||||
deleteSelectedEntities();
|
||||
}
|
||||
};
|
||||
|
||||
that.copySelectedEntities = function() {
|
||||
var entityProperties = Entities.getMultipleEntityProperties(that.selections);
|
||||
|
@ -434,7 +434,7 @@ SelectionManager = (function() {
|
|||
z: brn.z + entityClipboard.dimensions.z / 2
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
that.pasteEntities = function() {
|
||||
var dimensions = entityClipboard.dimensions;
|
||||
|
@ -442,7 +442,7 @@ SelectionManager = (function() {
|
|||
var pastePosition = getPositionToCreateEntity(maxDimension);
|
||||
var deltaPosition = Vec3.subtract(pastePosition, entityClipboard.position);
|
||||
|
||||
var copiedProperties = []
|
||||
var copiedProperties = [];
|
||||
var ids = [];
|
||||
entityClipboard.entities.forEach(function(originalProperties) {
|
||||
var properties = deepCopy(originalProperties);
|
||||
|
@ -475,7 +475,7 @@ SelectionManager = (function() {
|
|||
|
||||
redo(copiedProperties);
|
||||
undoHistory.pushCommand(undo, copiedProperties, redo, copiedProperties);
|
||||
}
|
||||
};
|
||||
|
||||
that._update = function(selectionUpdated) {
|
||||
var properties = null;
|
||||
|
|
Loading…
Reference in a new issue