Fix bug with Type selection of Array user defined variables
authorLaurent Bessard
Tue, 04 Dec 2012 18:01:47 +0100
changeset 762 4b60a0d313b0
parent 761 efff55931763
child 763 504ce1e3e94a
Fix bug with Type selection of Array user defined variables
objdictgen/commondialogs.py
objdictgen/nodemanager.py
--- a/objdictgen/commondialogs.py	Wed Oct 31 12:06:29 2012 +0100
+++ b/objdictgen/commondialogs.py	Tue Dec 04 18:01:47 2012 +0100
@@ -482,7 +482,7 @@
         self.Type = wx.ComboBox(choices=[], id=ID_USERTYPEDIALOGTYPE,
               name='Type', parent=self, pos=wx.Point(0, 0),
               size=wx.Size(0, 28), style=wx.CB_READONLY)
-        self.Type.Bind(wx.EVT_CHOICE, self.OnTypeChoice,
+        self.Type.Bind(wx.wx.EVT_COMBOBOX, self.OnTypeChoice,
               id=ID_USERTYPEDIALOGTYPE)
 
         self.Spacer = wx.Panel(id=ID_MAPVARIABLEDIALOGSPACER,
@@ -924,7 +924,7 @@
         self.Profile = wx.ComboBox(choices=[], id=ID_CREATENODEDIALOGPROFILE,
               name='Profile', parent=self, pos=wx.Point(0, 0),
               size=wx.Size(0, 28), style=wx.CB_READONLY)
-        self.Profile.Bind(wx.EVT_CHOICE, self.OnProfileChoice,
+        self.Profile.Bind(wx.EVT_COMBOBOX, self.OnProfileChoice,
               id=ID_CREATENODEDIALOGPROFILE)
 
         self.staticText5 = wx.StaticText(id=ID_CREATENODEDIALOGSTATICTEXT5,
--- a/objdictgen/nodemanager.py	Wed Oct 31 12:06:29 2012 +0100
+++ b/objdictgen/nodemanager.py	Tue Dec 04 18:01:47 2012 +0100
@@ -1055,7 +1055,7 @@
                 else:
                     if infos["user_defined"]:
                         if entry_infos["struct"] & OD_IdenticalSubindexes:
-                            if i == 0:
+                            if i == 1:
                                 editor["type"] = "type"
                                 editor["access"] = "access"
                         else: