]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@19815 ac1ea38d-2e2b...
authorlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Tue, 22 Feb 2011 10:57:09 +0000 (10:57 +0000)
committerlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Tue, 22 Feb 2011 10:57:09 +0000 (10:57 +0000)
org.simantics.sysdyn/src/org/simantics/sysdyn/mdlImport/MdlParser.java

index 3dcb3560b225f7b707d11ec4bb260701f5d1f53a..dd73915f5849b39b6cb0e03fe94fbda63ba3e62c 100644 (file)
@@ -70,7 +70,7 @@ public class MdlParser {
                        try {\r
                                String line = null; //not declared within while loop\r
                                \r
-                               // See if the document is encoded with UTF-8\r
+                               // See if the document is encoded with UTF-8. It will be marked with {UTF-8} on the first line\r
                                input.mark(30);\r
                                if (( line = input.readLine()) != null &&\r
                                                line.contains("{UTF-8}")){\r
@@ -454,9 +454,9 @@ public class MdlParser {
                                                connection = new Flow();\r
                                                if(connectionData[4].equals("100")) {\r
                                                        // Flip the flow\r
-                                                       Element temp = connection.getStart();\r
-                                                       connection.setStart(connection.getEnd());\r
-                                                       connection.setEnd(temp);\r
+                                                       Element temp = start;\r
+                                                       start = end;\r
+                                                       end = temp;\r
                                                }\r
                                        }\r
                                        connection.setStart(start);\r