mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 23:40:11 +02:00
Fix unexpectedly deleting multiple entities
This commit is contained in:
parent
21c15120ba
commit
9fe3a823ee
1 changed files with 7 additions and 2 deletions
|
@ -255,6 +255,7 @@
|
||||||
highlightedEntityID = null, // Root entity of highlighted entity set.
|
highlightedEntityID = null, // Root entity of highlighted entity set.
|
||||||
wasAppScaleWithHandles = false,
|
wasAppScaleWithHandles = false,
|
||||||
isOtherEditorEditingEntityID = false,
|
isOtherEditorEditingEntityID = false,
|
||||||
|
wasGripPressed = false,
|
||||||
hoveredOverlayID = null,
|
hoveredOverlayID = null,
|
||||||
|
|
||||||
// Position values.
|
// Position values.
|
||||||
|
@ -590,6 +591,7 @@
|
||||||
}
|
}
|
||||||
startEditing();
|
startEditing();
|
||||||
wasAppScaleWithHandles = isAppScaleWithHandles;
|
wasAppScaleWithHandles = isAppScaleWithHandles;
|
||||||
|
wasGripPressed = hand.gripPressed();
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateEditorGrabbing() {
|
function updateEditorGrabbing() {
|
||||||
|
@ -796,6 +798,7 @@
|
||||||
updateState();
|
updateState();
|
||||||
wasAppScaleWithHandles = isAppScaleWithHandles;
|
wasAppScaleWithHandles = isAppScaleWithHandles;
|
||||||
}
|
}
|
||||||
|
wasGripPressed = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!hand.valid()) {
|
if (!hand.valid()) {
|
||||||
|
@ -808,8 +811,10 @@
|
||||||
setState(EDITOR_SEARCHING);
|
setState(EDITOR_SEARCHING);
|
||||||
}
|
}
|
||||||
} else if (hand.gripPressed()) {
|
} else if (hand.gripPressed()) {
|
||||||
selection.deleteEntities();
|
if (!wasGripPressed) {
|
||||||
setState(EDITOR_SEARCHING);
|
selection.deleteEntities();
|
||||||
|
setState(EDITOR_SEARCHING);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
debug(side, "ERROR: Unexpected condition in EDITOR_GRABBING!");
|
debug(side, "ERROR: Unexpected condition in EDITOR_GRABBING!");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue