Fix unwanted translations in TypesTree
authorlaurent
Thu, 31 Mar 2011 10:53:13 +0200
changeset 512 07a7989f58e4
parent 511 38fdcbc8ebd7
child 513 fb787f6cbe33
Fix unwanted translations in TypesTree
PLCOpenEditor.py
--- a/PLCOpenEditor.py	Wed Mar 30 17:59:54 2011 +0200
+++ b/PLCOpenEditor.py	Thu Mar 31 10:53:13 2011 +0200
@@ -1249,7 +1249,9 @@
     def GenerateTypesTreeBranch(self, root, infos, topology=False):
         to_delete = []
         item_name = infos["name"]
-        self.TypesTree.SetItemText(root, _(item_name))
+        if infos["type"] in ITEMS_UNEDITABLE:
+            item_name = _(item_name)
+        self.TypesTree.SetItemText(root, item_name)
         self.TypesTree.SetPyData(root, infos["type"])
         if infos.get("tagname", None) in self.Errors:
             self.TypesTree.SetItemBackgroundColour(root, wx.Colour(255, 255, 0))