mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Fix scaling and changing hands history
This commit is contained in:
parent
1e2a3a13da
commit
d501a8f7cc
2 changed files with 15 additions and 7 deletions
|
@ -262,7 +262,9 @@ Selection = function (side) {
|
|||
}
|
||||
|
||||
// Add history entry.
|
||||
if (selection.length > 0) {
|
||||
if (selection.length > 0
|
||||
&& (!Vec3.equal(startPosition, rootPosition) || !Quat.equal(startOrientation, rootOrientation))) {
|
||||
// Positions and orientations can be identical if change grabbing hands when finish scaling.
|
||||
History.push(
|
||||
{
|
||||
setProperties: [
|
||||
|
|
|
@ -522,8 +522,10 @@
|
|||
|
||||
function stopDirectScaling() {
|
||||
// Called on grabbing hand by scaling hand.
|
||||
selection.finishDirectScaling();
|
||||
isDirectScaling = false;
|
||||
if (isDirectScaling) {
|
||||
selection.finishDirectScaling();
|
||||
isDirectScaling = false;
|
||||
}
|
||||
}
|
||||
|
||||
function startHandleScaling(targetPosition, overlayID) {
|
||||
|
@ -557,10 +559,12 @@
|
|||
|
||||
function stopHandleScaling() {
|
||||
// Called on grabbing hand by scaling hand.
|
||||
handles.finishScaling();
|
||||
selection.finishHandleScaling();
|
||||
handles.grab(null); // Stop highlighting grabbed handle and resume displaying all handles.
|
||||
isHandleScaling = false;
|
||||
if (isHandleScaling) {
|
||||
handles.finishScaling();
|
||||
selection.finishHandleScaling();
|
||||
handles.grab(null); // Stop highlighting grabbed handle and resume displaying all handles.
|
||||
isHandleScaling = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -739,6 +743,8 @@
|
|||
}
|
||||
|
||||
function exitEditorGrabbing() {
|
||||
stopDirectScaling();
|
||||
stopHandleScaling();
|
||||
finishEditing();
|
||||
handles.clear();
|
||||
otherEditor.setHandleOverlays([]);
|
||||
|
|
Loading…
Reference in a new issue