Fixing bug on ConfNodeEditors refresh
authorlaurent
Wed, 23 May 2012 16:28:50 +0200
changeset 751 a8dace95f965
parent 749 050f5a001826
child 752 35a86f033a36
Fixing bug on ConfNodeEditors refresh
ConfTreeNodeEditor.py
c_ext/CFileEditor.py
py_ext/PythonEditor.py
--- a/ConfTreeNodeEditor.py	Wed May 23 12:19:53 2012 +0200
+++ b/ConfTreeNodeEditor.py	Wed May 23 16:28:50 2012 +0200
@@ -185,23 +185,23 @@
         baseparamseditor_sizer.AddSizer(updownsizer, 0, border=5, 
                                     flag=wx.LEFT|wx.ALIGN_CENTER_VERTICAL)
         
+        ieccupbutton_id = wx.NewId()
+        self.IECCUpButton = wx.lib.buttons.GenBitmapTextButton(
+              id=ieccupbutton_id, bitmap=wx.Bitmap(opjimg('IECCDown')),
+              name='IECUpButton', parent=self.ParamsEditor, pos=wx.Point(0, 0),
+              size=wx.Size(16, 16), style=wx.NO_BORDER)
+        self.IECCUpButton.Bind(wx.EVT_BUTTON, self.GetItemChannelChangedFunction(1), 
+                              id=ieccupbutton_id)
+        updownsizer.AddWindow(self.IECCUpButton, 0, border=0, flag=wx.ALIGN_LEFT)
+        
         ieccdownbutton_id = wx.NewId()
         self.IECCDownButton = wx.lib.buttons.GenBitmapButton(
-              id=ieccdownbutton_id, bitmap=wx.Bitmap(opjimg('IECCDown')),
+              id=ieccdownbutton_id, bitmap=wx.Bitmap(opjimg('IECCUp')),
               name='IECDownButton', parent=self.ParamsEditor, pos=wx.Point(0, 0),
               size=wx.Size(16, 16), style=wx.NO_BORDER)
         self.IECCDownButton.Bind(wx.EVT_BUTTON, self.GetItemChannelChangedFunction(-1), 
                                 id=ieccdownbutton_id)
         updownsizer.AddWindow(self.IECCDownButton, 0, border=0, flag=wx.ALIGN_LEFT)
-
-        ieccupbutton_id = wx.NewId()
-        self.IECCUpButton = wx.lib.buttons.GenBitmapTextButton(
-              id=ieccupbutton_id, bitmap=wx.Bitmap(opjimg('IECCUp')),
-              name='IECUpButton', parent=self.ParamsEditor, pos=wx.Point(0, 0),
-              size=wx.Size(16, 16), style=wx.NO_BORDER)
-        self.IECCUpButton.Bind(wx.EVT_BUTTON, self.GetItemChannelChangedFunction(1), 
-                              id=ieccupbutton_id)
-        updownsizer.AddWindow(self.IECCUpButton, 0, border=0, flag=wx.ALIGN_LEFT)
         
         confnodename_id = wx.NewId()
         self.ConfNodeName = wx.TextCtrl(
--- a/c_ext/CFileEditor.py	Wed May 23 12:19:53 2012 +0200
+++ b/c_ext/CFileEditor.py	Wed May 23 16:28:50 2012 +0200
@@ -829,6 +829,8 @@
         self.RefreshView()
     
     def RefreshView(self):
+        ConfTreeNodeEditor.RefreshView(self)
+        
         for infos in self.Panels.itervalues():
             infos["panel"].RefreshView()
 
--- a/py_ext/PythonEditor.py	Wed May 23 12:19:53 2012 +0200
+++ b/py_ext/PythonEditor.py	Wed May 23 16:28:50 2012 +0200
@@ -296,6 +296,8 @@
             self.CurrentAction = None
 
     def RefreshView(self):
+        ConfTreeNodeEditor.RefreshView(self)
+        
         self.ResetBuffer()
         self.DisableEvents = True
         old_cursor_pos = self.ConfNodeEditor.GetCurrentPos()