mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 16:23:17 +02:00
Merge pull request #15921 from ctrlaltdavid/ctrl-duplicate
Make Create app use Ctrl key to duplicate entities instead of Alt
This commit is contained in:
commit
8b2c935f92
1 changed files with 9 additions and 4 deletions
|
@ -1118,6 +1118,11 @@ SelectionDisplay = (function() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// No action if the Alt key is pressed.
|
||||||
|
if (event.isAlt) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var pickRay = generalComputePickRay(event.x, event.y);
|
var pickRay = generalComputePickRay(event.x, event.y);
|
||||||
// TODO_Case6491: Move this out to setup just to make it once
|
// TODO_Case6491: Move this out to setup just to make it once
|
||||||
var interactiveOverlays = getMainTabletIDs();
|
var interactiveOverlays = getMainTabletIDs();
|
||||||
|
@ -2039,10 +2044,10 @@ SelectionDisplay = (function() {
|
||||||
Vec3.print(" pickResult.intersection", pickResult.intersection);
|
Vec3.print(" pickResult.intersection", pickResult.intersection);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Duplicate entities if alt is pressed. This will make a
|
// Duplicate entities if Ctrl is pressed. This will make a
|
||||||
// copy of the selected entities and move the _original_ entities, not
|
// copy of the selected entities and move the _original_ entities, not
|
||||||
// the new ones.
|
// the new ones.
|
||||||
if (event.isAlt || doDuplicate) {
|
if (event.isControl || doDuplicate) {
|
||||||
duplicatedEntityIDs = SelectionManager.duplicateSelection();
|
duplicatedEntityIDs = SelectionManager.duplicateSelection();
|
||||||
var ids = [];
|
var ids = [];
|
||||||
for (var i = 0; i < duplicatedEntityIDs.length; ++i) {
|
for (var i = 0; i < duplicatedEntityIDs.length; ++i) {
|
||||||
|
@ -2265,10 +2270,10 @@ SelectionDisplay = (function() {
|
||||||
addHandleTool(overlay, {
|
addHandleTool(overlay, {
|
||||||
mode: mode,
|
mode: mode,
|
||||||
onBegin: function(event, pickRay, pickResult) {
|
onBegin: function(event, pickRay, pickResult) {
|
||||||
// Duplicate entities if alt is pressed. This will make a
|
// Duplicate entities if Ctrl is pressed. This will make a
|
||||||
// copy of the selected entities and move the _original_ entities, not
|
// copy of the selected entities and move the _original_ entities, not
|
||||||
// the new ones.
|
// the new ones.
|
||||||
if (event.isAlt) {
|
if (event.isControl) {
|
||||||
duplicatedEntityIDs = SelectionManager.duplicateSelection();
|
duplicatedEntityIDs = SelectionManager.duplicateSelection();
|
||||||
var ids = [];
|
var ids = [];
|
||||||
for (var i = 0; i < duplicatedEntityIDs.length; ++i) {
|
for (var i = 0; i < duplicatedEntityIDs.length; ++i) {
|
||||||
|
|
Loading…
Reference in a new issue