Bug with indentation in textual languages while error display fixed
authorlbessard
Tue, 12 Aug 2008 18:14:07 +0200
changeset 228 da7ddaf27cca
parent 227 c6fee379d446
child 229 a5087e346baa
Bug with indentation in textual languages while error display fixed
PLCGenerator.py
--- a/PLCGenerator.py	Tue Aug 12 16:33:19 2008 +0200
+++ b/PLCGenerator.py	Tue Aug 12 18:14:07 2008 +0200
@@ -671,7 +671,7 @@
         body_type = body_content["name"]
         if body_type in ["IL","ST"]:
             self.Program = [(ReIndentText(body_content["value"].gettext(), len(self.CurrentIndent)), 
-                            (self.TagName, "body"))]
+                            (self.TagName, "body", len(self.CurrentIndent)))]
         elif body_type == "FBD":
             orderedInstances = []
             otherInstances = {"outVariables" : [], "block" : [], "connector" : []}
@@ -987,10 +987,10 @@
                 self.TagName = self.ParentGenerator.Controler.ComputePouTransitionName(self.Name, transitionValues["value"])
                 if transitionType == "IL":
                     transition_infos["content"] = [(":\n", ()),
-                                                   (ReIndentText(transitionBody.gettext(), len(self.CurrentIndent)), (self.TagName, "body"))]
+                                                   (ReIndentText(transitionBody.gettext(), len(self.CurrentIndent)), (self.TagName, "body", len(self.CurrentIndent)))]
                 elif transitionType == "ST":
                     transition_infos["content"] = [("\n", ()),
-                                                   (ReIndentText(transitionBody.gettext(), len(self.CurrentIndent)), (self.TagName, "body"))]
+                                                   (ReIndentText(transitionBody.gettext(), len(self.CurrentIndent)), (self.TagName, "body", len(self.CurrentIndent)))]
                 elif transitionType == "FBD":
                     for instance in transitionBody.getcontentInstances():
                         if isinstance(instance, plcopen.fbdObjects_outVariable):