Fixing bug on Windows with refresh when moving Viewer with scrollbars
authorlaurent
Sun, 08 Jan 2012 19:33:26 +0100
changeset 621 084a21799803
parent 620 f0232cd1628d
child 622 05394e275a1c
Fixing bug on Windows with refresh when moving Viewer with scrollbars
Viewer.py
--- a/Viewer.py	Sun Jan 08 19:29:45 2012 +0100
+++ b/Viewer.py	Sun Jan 08 19:33:26 2012 +0100
@@ -2911,7 +2911,9 @@
 #-------------------------------------------------------------------------------
 
     def OnScrollWindow(self, event):
-        if event.GetOrientation() == wx.HORIZONTAL:
+        if wx.Platform == '__WXMSW__':
+            wx.CallAfter(self.RefreshVisibleElements)
+        elif event.GetOrientation() == wx.HORIZONTAL:
             self.RefreshVisibleElements(xp = event.GetPosition())
         else:
             self.RefreshVisibleElements(yp = event.GetPosition())