]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/GLCanvas.py
Corrected _setCallbackInfo code so GiveFeedback can work
[wxWidgets.git] / wxPython / demo / GLCanvas.py
index 9fedcd72780527cb056a294c38539edd47685f4b..6757931c2f3ff749ef8d4e6c14a5090b40b51608 100644 (file)
@@ -98,14 +98,18 @@ else:
             self.Bind(wx.EVT_LEFT_UP, self.OnMouseUp)
             self.Bind(wx.EVT_MOTION, self.OnMouseMotion)
 
             self.Bind(wx.EVT_LEFT_UP, self.OnMouseUp)
             self.Bind(wx.EVT_MOTION, self.OnMouseMotion)
 
+
         def OnEraseBackground(self, event):
             pass # Do nothing, to avoid flashing on MSW.
 
         def OnEraseBackground(self, event):
             pass # Do nothing, to avoid flashing on MSW.
 
+
         def OnSize(self, event):
             size = self.GetClientSize()
             if self.GetContext():
                 self.SetCurrent()
                 glViewport(0, 0, size.width, size.height)
         def OnSize(self, event):
             size = self.GetClientSize()
             if self.GetContext():
                 self.SetCurrent()
                 glViewport(0, 0, size.width, size.height)
+            event.Skip()
+            
 
         def OnPaint(self, event):
             dc = wx.PaintDC(self)
 
         def OnPaint(self, event):
             dc = wx.PaintDC(self)
@@ -115,12 +119,15 @@ else:
                 self.init = True
             self.OnDraw()
 
                 self.init = True
             self.OnDraw()
 
+
         def OnMouseDown(self, evt):
             self.CaptureMouse()
 
         def OnMouseDown(self, evt):
             self.CaptureMouse()
 
+
         def OnMouseUp(self, evt):
             self.ReleaseMouse()
 
         def OnMouseUp(self, evt):
             self.ReleaseMouse()
 
+
         def OnMouseMotion(self, evt):
             if evt.Dragging() and evt.LeftIsDown():
                 self.x, self.y = self.lastx, self.lasty
         def OnMouseMotion(self, evt):
             if evt.Dragging() and evt.LeftIsDown():
                 self.x, self.y = self.lastx, self.lasty
@@ -259,7 +266,7 @@ overview = """\
 if __name__ == '__main__':
     import sys,os
     import run
 if __name__ == '__main__':
     import sys,os
     import run
-    run.main(['', os.path.basename(sys.argv[0])])
+    run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])