Fix optimization calculation for non-SI units
This commit is contained in:
parent
a2f8e25360
commit
3a4949e008
@ -658,8 +658,7 @@ public class GeneralOptimizationDialog extends JDialog {
|
|||||||
} else if (GOAL_MINIMIZE.equals(value)) {
|
} else if (GOAL_MINIMIZE.equals(value)) {
|
||||||
goal = new MinimizationGoal();
|
goal = new MinimizationGoal();
|
||||||
} else if (GOAL_SEEK.equals(value)) {
|
} else if (GOAL_SEEK.equals(value)) {
|
||||||
Unit u = parameter.getUnitGroup().getDefaultUnit();
|
goal = new ValueSeekGoal(optimizationSeekValue.getValue());
|
||||||
goal = new ValueSeekGoal(u.toUnit(optimizationSeekValue.getValue()));
|
|
||||||
} else {
|
} else {
|
||||||
throw new BugException("optimizationGoalCombo had invalid value: " + value);
|
throw new BugException("optimizationGoalCombo had invalid value: " + value);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user