WxPandaWindow.OpenGLPandaWindow does not support mouse wheel

Bug #1210850 reported by Craig Macomber
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Panda3D
Fix Released
Undecided
rdb

Bug Description

OpenGLPandaWindow in direct.wxwidgets.WxPandaWindow does not forward mouse wheel events from wx.

Fix:

add this bind:

self.Bind(wx.EVT_MOUSEWHEEL, self.__mouseWheel)

add this method:

    def __mouseWheel(self, event):
        amount=event.GetWheelRotation()
        if amount>0.0:
            self.inputDevice.buttonDown(MouseButton.wheelUp())
            self.inputDevice.buttonUp(MouseButton.wheelUp())
        elif amount<0.0:
            self.inputDevice.buttonDown(MouseButton.wheelDown())
            self.inputDevice.buttonUp(MouseButton.wheelDown())

Issues with this fix:
scroll amount is not forwarded.
does not scroll until you click on the panda window to focus is.

This fix can be added to a subclass as a workaround until it makes it into panda.

Revision history for this message
rdb (rdb) wrote :

Thanks for providing a fix.

Changed in panda3d:
assignee: nobody → rdb (rdb)
milestone: none → 1.8.2
status: New → Fix Committed
rdb (rdb)
Changed in panda3d:
milestone: 1.8.2 → 1.9.0
rdb (rdb)
Changed in panda3d:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.