From faa6d87f239022396793487dabfb945d5e6508af Mon Sep 17 00:00:00 2001 From: lempinen Date: Thu, 24 Oct 2013 11:28:55 +0000 Subject: [PATCH] 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 --- .../adapter/ActiveDatasetsIndexVariable.java | 20 ++++++++++++++++++- .../sysdyn/manager/HistoryDatasetResult.java | 10 ++++++++++ .../sysdyn/manager/MemoryResult.java | 5 +++-- 3 files changed, 32 insertions(+), 3 deletions(-) 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; } -- 2.47.1