Fixing bug with wheel mouse on GraphicViewer
authorLaurent Bessard
Tue, 17 Jul 2012 21:20:09 +0200
changeset 726 300ced19d03c
parent 725 7c44fc339889
child 727 46ae58e6469f
Fixing bug with wheel mouse on GraphicViewer
GraphicViewer.py
--- a/GraphicViewer.py	Fri Jul 13 12:42:38 2012 +0200
+++ b/GraphicViewer.py	Tue Jul 17 21:20:09 2012 +0200
@@ -78,7 +78,6 @@
         self.Canvas.canvas.Bind(wx.EVT_MIDDLE_DOWN, self.OnCanvasMiddleDown)
         self.Canvas.canvas.Bind(wx.EVT_MIDDLE_UP, self.OnCanvasMiddleUp)
         self.Canvas.canvas.Bind(wx.EVT_MOTION, self.OnCanvasMotion)
-        self.Canvas.canvas.Bind(wx.EVT_MOUSEWHEEL, self.OnCanvasMouseWheel)
         self.Canvas.canvas.Bind(wx.EVT_SIZE, self.OnCanvasResize)
         main_sizer.AddWindow(self.Canvas, 0, border=0, flag=wx.GROW)
         
@@ -149,6 +148,8 @@
         
         self.Editor.SetSizer(main_sizer)
 
+        self.Editor.Bind(wx.EVT_MOUSEWHEEL, self.OnCanvasMouseWheel)
+
     def __init__(self, parent, window, producer, instancepath = ""):
         EditorPanel.__init__(self, parent, "", window, None)
         DebugViewer.__init__(self, producer, True, False)