]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Asking OpenModelica version only upon running the first experiment after startup...
authormiettinen <miettinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Wed, 9 Jan 2013 10:14:07 +0000 (10:14 +0000)
committermiettinen <miettinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Wed, 9 Jan 2013 10:14:07 +0000 (10:14 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@26594 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynExperiment.java

index 11ed3155e7f1f484a3545d6a44be843b0700d58e..35c6e9b361550bb5f7a38037a73d925d10b523d7 100644 (file)
@@ -79,6 +79,7 @@ public class SysdynExperiment extends Experiment implements IDynamicExperiment,
     private File                                    simulationDir;\r
 \r
     protected String                                experimentName;\r
+    protected static String                         omcVersion = null;\r
     \r
     public static SysdynExperiment                                     INSTANCE;\r
 \r
@@ -476,7 +477,10 @@ public class SysdynExperiment extends Experiment implements IDynamicExperiment,
         \r
         // Add changed parameters in case that structure has not changed\r
         HashMap<String, String> changes = structureChanged ? null : new HashMap<String, String>();\r
-        if(!structureChanged && previousParameters != null && ModelicaManager.getOMCVersion().startsWith("1.9")) {\r
+        if (omcVersion == null) {\r
+            omcVersion = ModelicaManager.getOMCVersion();\r
+        }\r
+        if(!structureChanged && previousParameters != null && omcVersion.startsWith("1.9")) {\r
             try {\r
                 ModelicaManager.createFullMo(simulationLocation, monitor);\r
                 HashMap<String, String> newParameters = ModelicaManager.getFullModelParameters(simulationLocation, monitor);\r