mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
Merge pull request #9955 from druiz17/tablet-edit-selecting
Fix edit.js from deselecting an object when trying to delete it
This commit is contained in:
commit
b7f48644af
1 changed files with 12 additions and 1 deletions
|
@ -701,11 +701,22 @@ function mouseReleaseEvent(event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function wasTabletClicked(event) {
|
||||||
|
var rayPick = Camera.computePickRay(event.x, event.y);
|
||||||
|
var result = Overlays.findRayIntersection(rayPick, true, [HMD.tabletID, HMD.tabletScreenID, HMD.homeButtonID]);
|
||||||
|
return result.intersects;
|
||||||
|
}
|
||||||
|
|
||||||
function mouseClickEvent(event) {
|
function mouseClickEvent(event) {
|
||||||
var wantDebug = false;
|
var wantDebug = false;
|
||||||
var result, properties;
|
var result, properties, tabletClicked;
|
||||||
if (isActive && event.isLeftButton) {
|
if (isActive && event.isLeftButton) {
|
||||||
result = findClickedEntity(event);
|
result = findClickedEntity(event);
|
||||||
|
tabletClicked = wasTabletClicked(event);
|
||||||
|
if (tabletClicked) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (result === null || result === undefined) {
|
if (result === null || result === undefined) {
|
||||||
if (!event.isShifted) {
|
if (!event.isShifted) {
|
||||||
selectionManager.clearSelections();
|
selectionManager.clearSelections();
|
||||||
|
|
Loading…
Reference in a new issue