From: miettinen Date: Wed, 9 Jan 2013 10:14:07 +0000 (+0000) Subject: Asking OpenModelica version only upon running the first experiment after startup... X-Git-Tag: simantics-1.10.1~84 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=d3bc433f627916ec806b283b8bd249aa69592cf2;p=simantics%2Fsysdyn.git Asking OpenModelica version only upon running the first experiment after startup (refs #3941). git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@26594 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynExperiment.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynExperiment.java index 11ed3155..35c6e9b3 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynExperiment.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynExperiment.java @@ -79,6 +79,7 @@ public class SysdynExperiment extends Experiment implements IDynamicExperiment, private File simulationDir; protected String experimentName; + protected static String omcVersion = null; public static SysdynExperiment INSTANCE; @@ -476,7 +477,10 @@ public class SysdynExperiment extends Experiment implements IDynamicExperiment, // Add changed parameters in case that structure has not changed HashMap changes = structureChanged ? null : new HashMap(); - if(!structureChanged && previousParameters != null && ModelicaManager.getOMCVersion().startsWith("1.9")) { + if (omcVersion == null) { + omcVersion = ModelicaManager.getOMCVersion(); + } + if(!structureChanged && previousParameters != null && omcVersion.startsWith("1.9")) { try { ModelicaManager.createFullMo(simulationLocation, monitor); HashMap newParameters = ModelicaManager.getFullModelParameters(simulationLocation, monitor);