From: lempinen Date: Thu, 24 Oct 2013 11:28:55 +0000 (+0000) Subject: Fixed history datasets to display values in the case where dataset contains "Variable... X-Git-Tag: 1.8.1~226 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=faa6d87f239022396793487dabfb945d5e6508af;p=simantics%2Fsysdyn.git Fixed history datasets to display values in the case where dataset contains "Variable" and system asks for "Module1.Variable". First try to find the exact, but if not found, try from the last "." forward. In "Variable" case it would eventually find the correct variable. refs #4494 git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@28114 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/adapter/ActiveDatasetsIndexVariable.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/adapter/ActiveDatasetsIndexVariable.java index c8df2821..176fd467 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/adapter/ActiveDatasetsIndexVariable.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/adapter/ActiveDatasetsIndexVariable.java @@ -33,7 +33,25 @@ public class ActiveDatasetsIndexVariable extends IndexVariable< ArrayList(); + if(result != null) setResult(result); - results = new THashMap(); } @Override @@ -75,7 +76,7 @@ public class MemoryResult extends SysdynResult { ds = simulationResult.readVariable(variable, resultFile); if(ds != null) { - SysdynDataSet sds = new SysdynDataSet(variable, getResultName(), ds.times, ds.values, resultIndex); + SysdynDataSet sds = new SysdynDataSet(ds.name, getResultName(), ds.times, ds.values, resultIndex); results.put(variable, sds); return sds; }