Fixed refresh bug when activating element in instance variables list
authorLaurent Bessard
Thu, 11 Jul 2013 12:49:04 +0200
changeset 1277 358db9d64aa1
parent 1276 29bfd39e8e7a
child 1278 74afc7e86d00
Fixed refresh bug when activating element in instance variables list
controls/PouInstanceVariablesPanel.py
--- a/controls/PouInstanceVariablesPanel.py	Thu Jul 11 12:47:25 2013 +0200
+++ b/controls/PouInstanceVariablesPanel.py	Thu Jul 11 12:49:04 2013 +0200
@@ -52,7 +52,6 @@
         self.InstanceChoice = wx.ComboBox(self, size=wx.Size(0, 0), style=wx.CB_READONLY)
         self.Bind(wx.EVT_COMBOBOX, self.OnInstanceChoiceChanged,
                 self.InstanceChoice)
-        self.InstanceChoice.Bind(wx.EVT_LEFT_DOWN, self.OnInstanceChoiceLeftDown)
         
         self.DebugButton = wx.lib.buttons.GenBitmapButton(self, 
               bitmap=GetBitmap("debug_instance"), size=wx.Size(28, 28), style=wx.NO_BORDER)
@@ -365,8 +364,8 @@
                         item_path = "%s.%s" % (instance_path, item_infos["name"])
                     else:
                         item_path = None
-                    wx.CallAfter(self.SetPouType, tagname, item_path)
-                    wx.CallAfter(self.ParentWindow.SelectProjectTreeItem, tagname)
+                    self.SetPouType(tagname, item_path)
+                    self.ParentWindow.SelectProjectTreeItem(tagname)
         event.Skip()
     
     def OnVariablesListLeftDown(self, event):
@@ -391,6 +390,4 @@
         keycode = event.GetKeyCode()
         if keycode != wx.WXK_LEFT:
             event.Skip()
-        
-    def OnInstanceChoiceLeftDown(self, event):
-        event.Skip()
+