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:
Ryan Huffman 2019-07-23 08:52:22 -07:00 committed by GitHub
commit 8b2c935f92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1118,6 +1118,11 @@ SelectionDisplay = (function() {
return false;
}
// No action if the Alt key is pressed.
if (event.isAlt) {
return;
}
var pickRay = generalComputePickRay(event.x, event.y);
// TODO_Case6491: Move this out to setup just to make it once
var interactiveOverlays = getMainTabletIDs();
@ -2039,10 +2044,10 @@ SelectionDisplay = (function() {
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
// the new ones.
if (event.isAlt || doDuplicate) {
if (event.isControl || doDuplicate) {
duplicatedEntityIDs = SelectionManager.duplicateSelection();
var ids = [];
for (var i = 0; i < duplicatedEntityIDs.length; ++i) {
@ -2265,10 +2270,10 @@ SelectionDisplay = (function() {
addHandleTool(overlay, {
mode: mode,
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
// the new ones.
if (event.isAlt) {
if (event.isControl) {
duplicatedEntityIDs = SelectionManager.duplicateSelection();
var ids = [];
for (var i = 0; i < duplicatedEntityIDs.length; ++i) {