Skip to content

Commit

Permalink
Fixed issue #1024.
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsschmidt1337 committed Mar 15, 2024
1 parent 742c660 commit 363b264
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/org/nschmidt/ldparteditor/helper/Manipulator.java
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ private GColour manipulatorStatusHelper(float r, float g, float b, int type, Com
calmDownCounter = -2;
xRotatingForwards = true;
}
}else {
} else {
if (calmDownCounter < 0) {
calmDownCounter += 1;
break;
Expand All @@ -933,7 +933,7 @@ private GColour manipulatorStatusHelper(float r, float g, float b, int type, Com
calmDownCounter = -2;
yRotatingForwards = true;
}
}else {
} else {
if (calmDownCounter < 0) {
calmDownCounter += 1;
break;
Expand All @@ -952,7 +952,7 @@ private GColour manipulatorStatusHelper(float r, float g, float b, int type, Com
calmDownCounter = -2;
zRotatingForwards = true;
}
}else {
} else {
if (calmDownCounter < 0) {
calmDownCounter += 1;
break;
Expand All @@ -971,7 +971,7 @@ private GColour manipulatorStatusHelper(float r, float g, float b, int type, Com
calmDownCounter = -2;
vRotatingForwards = true;
}
}else {
} else {
if (calmDownCounter < 0) {
calmDownCounter += 1;
break;
Expand Down Expand Up @@ -1274,7 +1274,7 @@ public Vector4f transform(Vector2f oldMousePosition, int newX, int newY, Composi
accurateResult = Matrix.mul(View.ACCURATE_ID.translate(new BigDecimal[] { accuratePosition[0].negate(), accuratePosition[1].negate(), accuratePosition[2].negate() }), accurateResult);
}

if (xRotate && xRotatingForwards || xRotatingBackwards) {
if (xRotate && (xRotatingForwards || xRotatingBackwards)) {
if (xRotatingForwards) {
transformation.rotate(snapXrotate.floatValue(), new Vector3f(xAxis.x, xAxis.y, xAxis.z));
accurateTransformation = View.ACCURATE_ID.rotate(snapXrotate, snapXrotateFlag, accurateXaxis);
Expand Down Expand Up @@ -1319,7 +1319,7 @@ public Vector4f transform(Vector2f oldMousePosition, int newX, int newY, Composi
modified = true;
}

if (yRotate && yRotatingForwards || yRotatingBackwards) {
if (yRotate && (yRotatingForwards || yRotatingBackwards)) {
if (yRotatingForwards) {
transformation.rotate(snapYrotate.floatValue(), new Vector3f(yAxis.x, yAxis.y, yAxis.z));
accurateTransformation = View.ACCURATE_ID.rotate(snapYrotate, snapYrotateFlag, accurateYaxis);
Expand Down Expand Up @@ -1364,7 +1364,7 @@ public Vector4f transform(Vector2f oldMousePosition, int newX, int newY, Composi
modified = true;
}

if (zRotate && zRotatingForwards || zRotatingBackwards) {
if (zRotate && (zRotatingForwards || zRotatingBackwards)) {
if (zRotatingForwards) {
transformation.rotate(snapZrotate.floatValue(), new Vector3f(zAxis.x, zAxis.y, zAxis.z));
accurateTransformation = View.ACCURATE_ID.rotate(snapZrotate, snapZrotateFlag, accurateZaxis);
Expand Down Expand Up @@ -1409,7 +1409,7 @@ public Vector4f transform(Vector2f oldMousePosition, int newX, int newY, Composi
modified = true;
}

if (vRotate && vRotatingForwards || vRotatingBackwards) {
if (vRotate && (vRotatingForwards || vRotatingBackwards)) {
Vector4f[] gen = c3d.getGenerator();
if (vRotatingForwards) {
transformation.rotate(snapVrotate.floatValue(), new Vector3f(gen[2].x, gen[2].y, gen[2].z));
Expand Down

0 comments on commit 363b264

Please sign in to comment.