# HG changeset patch
# User Laurent Bessard
# Date 1366788610 -7200
# Node ID 50246061d5c652c1c734a7b6781cd40543414ce3
# Parent  bb8ac451c28ade6ba3000bcd6bdcd69d0f40bb81
Fixed new ConfTreeNodeEditor layout on Windows

diff -r bb8ac451c28a -r 50246061d5c6 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()