\r
}\r
\r
- private void ensureInformationAvailable(ReadGraph graph) throws DatabaseException {\r
+ protected void ensureInformationAvailable(ReadGraph graph) throws DatabaseException {\r
SimulationResource SIMU = SimulationResource.getInstance(graph);\r
ModelingResources MOD = ModelingResources.getInstance(graph);\r
\r
package org.simantics.sysdyn.adapter;\r
\r
+import java.util.Arrays;\r
+\r
+import org.simantics.databoard.binding.Binding;\r
import org.simantics.db.ReadGraph;\r
+import org.simantics.db.WriteGraph;\r
import org.simantics.db.exception.DatabaseException;\r
import org.simantics.db.layer0.variable.Variable;\r
\r
return array[0];\r
}\r
\r
+ @Override\r
+ public void setValue(WriteGraph graph, Object value) throws DatabaseException {\r
+ ensureInformationAvailable(graph);\r
+ double[] existing = getValueFull();\r
+ double[] newValue = Arrays.copyOf(existing, existing.length);\r
+ newValue[0] = (Double)value;\r
+ super.setValue(graph, newValue);\r
+ }\r
+ \r
+ @Override\r
+ public void setValue(WriteGraph graph, Object value, Binding binding) throws DatabaseException {\r
+ setValue(graph, value);\r
+ }\r
+ \r
}\r