Fix scroll bug in ConfNode params panel when changing tab selection on Windows
authorLaurent Bessard
Sun, 23 Sep 2012 18:57:35 +0200
changeset 840 980863738cf6
parent 839 25ba9d74afb1
child 841 8e19df12b596
Fix scroll bug in ConfNode params panel when changing tab selection on Windows
editors/ConfTreeNodeEditor.py
--- a/editors/ConfTreeNodeEditor.py	Sat Sep 22 12:33:39 2012 +0200
+++ b/editors/ConfTreeNodeEditor.py	Sun Sep 23 18:57:35 2012 +0200
@@ -277,6 +277,7 @@
                 self.ConfNodeName.ChangeValue(self.Controler.MandatoryParams[1].getName())
                 self.RefreshIECChannelControlsState()
             self.RefreshConfNodeParamsSizer()
+            self.RefreshScrollbars()
     
     def EnableScrolling(self, enable):
         self.ScrollingEnabled = enable
@@ -555,7 +556,7 @@
             event.Skip()
         return OnBrowseButton
     
-    def OnWindowResize(self, event):
+    def RefreshScrollbars(self):
         self.ParamsEditor.GetBestSize()
         xstart, ystart = self.ParamsEditor.GetViewStart()
         window_size = self.ParamsEditor.GetClientSize()
@@ -565,6 +566,9 @@
         self.ParamsEditor.Scroll(posx, posy)
         self.ParamsEditor.SetScrollbars(SCROLLBAR_UNIT, SCROLLBAR_UNIT, 
                 maxx / SCROLLBAR_UNIT, maxy / SCROLLBAR_UNIT, posx, posy)
+    
+    def OnWindowResize(self, event):
+        self.RefreshScrollbars()
         event.Skip()
     
     def OnMouseWheel(self, event):