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:
Vadim Zeitlin
2015-09-06 19:40:03 +02:00
parent 50daf1feab
commit 4177593aef

View File

@@ -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: