--- a/dialogs/PouActionDialog.py Wed Sep 12 11:36:50 2018 +0200
+++ b/dialogs/PouActionDialog.py Wed Sep 12 22:59:30 2018 +0200
@@ -36,14 +36,14 @@
return [_("IL"), _("ST"), _("LD"), _("FBD")]
-ACTION_LANGUAGES_DICT = dict([(_(language), language) for language in GetActionLanguages()])
-
-
class PouActionDialog(wx.Dialog):
def __init__(self, parent):
wx.Dialog.__init__(self, parent, title=_('Create a new action'))
+ self.ACTION_LANGUAGES_DICT = dict([(_(language), language)
+ for language in GetActionLanguages()])
+
main_sizer = wx.FlexGridSizer(cols=1, hgap=0, rows=2, vgap=10)
main_sizer.AddGrowableCol(0)
main_sizer.AddGrowableRow(0)
@@ -131,5 +131,5 @@
def GetValues(self):
values = {}
values["actionName"] = self.ActionName.GetValue()
- values["language"] = ACTION_LANGUAGES_DICT[self.Language.GetStringSelection()]
+ values["language"] = self.ACTION_LANGUAGES_DICT[self.Language.GetStringSelection()]
return values