Fix vertical wheel scrolling direction in wxGenericCalendarCtrl
Make scrolling upwards (positive delta) go to the past (i.e. decrease the
date) for consistency with the native calendar controls.
See 50daf1feab (commitcomment-13087042)
This commit is contained in:
@@ -1519,7 +1519,10 @@ void wxGenericCalendarCtrl::OnWheel(wxMouseEvent& event)
|
||||
switch ( event.GetWheelAxis() )
|
||||
{
|
||||
case wxMOUSE_WHEEL_VERTICAL:
|
||||
span = wxDateSpan::Month();
|
||||
// For consistency with the native controls, scrolling upwards
|
||||
// should go to the past, even if the rotation is positive and
|
||||
// could be normally expected to increase the date.
|
||||
span = -wxDateSpan::Month();
|
||||
break;
|
||||
|
||||
case wxMOUSE_WHEEL_HORIZONTAL:
|
||||
|
Reference in New Issue
Block a user