ProjectController.py
branchwxPython4
changeset 3426 c2c366964913
parent 3421 70ef15fca028
child 3476 46a7aac382ef
--- a/ProjectController.py	Sun Feb 13 21:01:27 2022 +0100
+++ b/ProjectController.py	Sun Feb 13 21:05:19 2022 +0100
@@ -796,7 +796,7 @@
         # Compute offset before ST resulting of transformation from user POUs
         self.ProgramOffset = IECCodeContent.count("\n")
 
-        IECCodeContent += open(self._getIECgeneratedcodepath(), "r").read()
+        POUsIECCodeContent = open(self._getIECgeneratedcodepath(), "r").read()
 
         IECcodepath = self._getIECcodepath()
 
@@ -805,9 +805,11 @@
 
         with open(IECcodepath, "w") as plc_file:
             plc_file.write(IECCodeContent)
+            plc_file.write(POUsIECCodeContent)
 
         hasher = hashlib.md5()
         hasher.update(IECCodeContent)
+        hasher.update(POUsIECCodeContent)
         self.IECcodeDigest = hasher.hexdigest()
 
         return True