Fix bug in create POU dialog
authorlaurent
Thu, 03 May 2012 23:19:17 +0200
changeset 677 8f1f6022b3d3
parent 676 0f10f5091245
child 678 9d58192e823a
Fix bug in create POU dialog
PLCOpenEditor.py
--- a/PLCOpenEditor.py	Thu May 03 19:02:17 2012 +0200
+++ b/PLCOpenEditor.py	Thu May 03 23:19:17 2012 +0200
@@ -3624,11 +3624,6 @@
  ID_POUDIALOGSTATICTEXT2, ID_POUDIALOGSTATICTEXT3, 
 ] = [wx.NewId() for _init_ctrls in range(7)]
 
-def GetTransitionLanguages():
-    _ = lambda x : x
-    return [_("IL"), _("ST"), _("LD"), _("FBD")]
-TRANSITION_LANGUAGES_DICT = dict([(_(language), language) for language in GetTransitionLanguages()])
-
 def GetPouTypes():
     _ = lambda x : x
     return [_("function"), _("functionBlock"), _("program")]
@@ -3773,7 +3768,7 @@
         self.Language.Clear()
         for language in GetPouLanguages():
             if language != "SFC" or POU_TYPES_DICT[self.PouType.GetStringSelection()] != "function":
-                self.Language.Append(language)
+                self.Language.Append(_(language))
         if self.Language.FindString(_(selection)) != wx.NOT_FOUND:
             self.Language.SetStringSelection(_(selection))
 
@@ -3794,7 +3789,7 @@
             elif item == "pouType":
                 self.PouType.SetStringSelection(_(value))
             elif item == "language":
-                self.Language.SetStringSelection(_(POU_LANGUAGES_DICT))
+                self.Language.SetStringSelection(_(value))
                 
     def GetValues(self):
         values = {}