mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
enable duplicate copy cut paste functionality of context menu
This commit is contained in:
parent
4069ca2e0c
commit
3fa4ee0e1d
2 changed files with 8 additions and 4 deletions
|
@ -268,8 +268,9 @@ function loaded() {
|
|||
}));
|
||||
}
|
||||
|
||||
let enabledContextMenuItems = [];
|
||||
let enabledContextMenuItems = ['Copy', 'Paste', 'Duplicate'];
|
||||
if (entitiesByID[entityID] && !entitiesByID[entityID].locked) {
|
||||
enabledContextMenuItems.push('Cut');
|
||||
enabledContextMenuItems.push('Rename');
|
||||
enabledContextMenuItems.push('Delete');
|
||||
}
|
||||
|
|
|
@ -271,12 +271,15 @@ EntityListTool = function(shouldUseEditTabletApp) {
|
|||
filterInView = data.filterInView === true;
|
||||
} else if (data.type === "radius") {
|
||||
searchRadius = data.radius;
|
||||
} else if (data.type === "cut") {
|
||||
cutSelectedEntities();
|
||||
} else if (data.type === "copy") {
|
||||
Window.alert("Copy is not yet implemented.");
|
||||
copySelectedEntities();
|
||||
} else if (data.type === "paste") {
|
||||
Window.alert("Paste is not yet implemented.");
|
||||
pasteEntities();
|
||||
} else if (data.type === "duplicate") {
|
||||
Window.alert("Duplicate is not yet implemented.");
|
||||
SelectionManager.duplicateSelection();
|
||||
that.sendUpdate();
|
||||
} else if (data.type === "rename") {
|
||||
Entities.editEntity(data.entityID, {name: data.name});
|
||||
// make sure that the name also gets updated in the properties window
|
||||
|
|
Loading…
Reference in a new issue