Commit c9577cb8 authored by Nico Mack's avatar Nico Mack

Minor improvements

parent d696c066
......@@ -66,6 +66,7 @@ public class ScriptableCondition<T> extends Condition<T> implements VariableBase
public ScriptableCondition(BaseScriptableConditionBuilder<?> builder) {
this.expression = builder.expression;
this.parameters = builder.parameters;
this.setupCondition(expression);
}
// ---------------------------------------------------------------------------
......
......@@ -218,10 +218,10 @@ public class SelectorWidget extends ValueWidget {
protected void updateFromRotation(double angle, Direction direction) {
if (this.multiTurn) {
super.updateFromRotation(angle, direction);
if (this.variable.wasModified()) {
int position = this.variable.getValue().intValue();
selectableCoronas.forEach(indexed -> indexed.satisfiedBy(position));
}
// if (this.variable.wasModified()) {
int position = this.variable.getValue().intValue();
selectableCoronas.forEach(indexed -> indexed.satisfiedBy(position));
// }
}
}
......
......@@ -88,6 +88,7 @@ public class ValueWidget extends TetherableWidget implements InformationProvider
protected double initialAngle;
private double stepAngle;
private double lastAngle;
private int completedTurns;
private List<ValueCorona> dispatcher;
......@@ -162,6 +163,7 @@ public class ValueWidget extends TetherableWidget implements InformationProvider
}
lastAngle = Double.NaN;
completedTurns = 0;
this.initialValue = (!Double.isNaN(variable.getInitialValue())) ? variable.getInitialValue() : 0d;
......@@ -258,6 +260,7 @@ public class ValueWidget extends TetherableWidget implements InformationProvider
break;
default:
}
completedTurns = (int) Math.floor(value / (360 * stepSize));
}
lastAngle = angle;
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment