From 818a665f80791b2dad22a6110c81631731fe207c Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 21 Aug 2007 20:04:49 +0000 Subject: [PATCH] Don't set the event type until we are sure it is a vertical wheel event. (Horizontal wheel events are not supported in 2.8 and can cause a divide-by-zero if they are handled incorrectly.) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/toplevel.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index 7c9b6b0191..e30182e23d 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -364,13 +364,12 @@ void SetupMouseEvent( wxMouseEvent &wxevent , wxMacCarbonEvent &cEvent ) case kEventMouseWheelMoved : { - wxevent.SetEventType( wxEVT_MOUSEWHEEL ) ; - EventMouseWheelAxis axis = cEvent.GetParameter(kEventParamMouseWheelAxis, typeMouseWheelAxis) ; SInt32 delta = cEvent.GetParameter(kEventParamMouseWheelDelta, typeSInt32) ; if ( axis == kEventMouseWheelAxisY ) { + wxevent.SetEventType( wxEVT_MOUSEWHEEL ) ; wxevent.m_wheelRotation = delta; wxevent.m_wheelDelta = 1; wxevent.m_linesPerAction = 1;