Commit 1a480ac5 authored by Nico Mack's avatar Nico Mack

Fixed a bug with preslection of SelectorWidget

EquationSystem now lists outputs not being assigned to an equation
parent 52cd22f6
...@@ -512,7 +512,11 @@ public class EquationSystemBuilder { ...@@ -512,7 +512,11 @@ public class EquationSystemBuilder {
resolveDependencies(); resolveDependencies();
if (!this.allOutputsAssigned()) { if (!this.allOutputsAssigned()) {
LOGGER.warn("Not all defined outputs are assigned to an equation!"); //$NON-NLS-1$ List<String> assignedOutputs = new ArrayList<>();
assignedOutputs.addAll(outputVariables.keySet());
assignedOutputs.removeAll(rootEquations.keySet());
LOGGER.warn("Not all defined outputs are assigned to an equation! => {}", assignedOutputs); //$NON-NLS-1$
} }
} }
......
...@@ -191,8 +191,10 @@ public class SelectorWidget extends ValueWidget { ...@@ -191,8 +191,10 @@ public class SelectorWidget extends ValueWidget {
public List<Variable<?>> connectWithSystemVariables(Map<String, Variable<?>> systemVariables) { public List<Variable<?>> connectWithSystemVariables(Map<String, Variable<?>> systemVariables) {
List<Variable<?>> connected = super.connectWithSystemVariables(systemVariables); List<Variable<?>> connected = super.connectWithSystemVariables(systemVariables);
if (presetPosition != NONE) {
this.selectPosition(presetPosition); if ((presetPosition != NONE) && connected.contains(variable)) {
variable.setValue((double) presetPosition);
variable.notifyInputChangeListeners();
} }
return connected; return connected;
......
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