Fixed new ConfTreeNodeEditor layout on Windows
authorLaurent Bessard
Wed, 24 Apr 2013 09:30:10 +0200
changeset 1059 50246061d5c6
parent 1058 bb8ac451c28a
child 1060 ac9896336b90
Fixed new ConfTreeNodeEditor layout on Windows
editors/ConfTreeNodeEditor.py
--- a/editors/ConfTreeNodeEditor.py	Wed Apr 24 09:29:32 2013 +0200
+++ b/editors/ConfTreeNodeEditor.py	Wed Apr 24 09:30:10 2013 +0200
@@ -204,6 +204,7 @@
                 parent = self.ConfNodeNoteBook
                 self.MainSizer.AddWindow(self.ConfNodeNoteBook, 1, flag=wx.GROW)
             else:
+                parent = self.Editor
                 self.ConfNodeNoteBook = None
             
             self.Editor.SetSizer(self.MainSizer)
@@ -223,8 +224,7 @@
         if self.SHOW_PARAMS and len(self.Controler.GetParamsAttributes()) > 0:
             
             panel_style = wx.TAB_TRAVERSAL|wx.HSCROLL|wx.VSCROLL
-            editor_parent = parent
-            if self.ConfNodeNoteBook is None:
+            if self.ConfNodeNoteBook is None and parent != self.Editor:
                 panel_style |= wx.SUNKEN_BORDER
             self.ParamsEditor = wx.ScrolledWindow(parent, 
                   style=panel_style)
@@ -303,6 +303,7 @@
     def RefreshIECChannelControlsState(self):
         self.FullIECChannel.SetLabel(self.Controler.GetFullIEC_Channel())
         self.IECCDownButton.Enable(self.Controler.BaseParams.getIEC_Channel() > 0)
+        self.MainSizer.Layout()
     
     def RefreshConfNodeParamsSizer(self):
         self.Freeze()