Handle all consecutive clicks on generic calendar month buttons
Without handling the double click event, some (or all, on OS X) of the following clicks in a rapid series of clicks are ignored. This makes changing the month unnecessarily slow.
This commit is contained in:
parent
c239160d33
commit
773690203e
@ -1325,13 +1325,21 @@ bool wxGenericCalendarCtrl::GetDateCoord(const wxDateTime& date, int *day, int *
|
||||
|
||||
void wxGenericCalendarCtrl::OnDClick(wxMouseEvent& event)
|
||||
{
|
||||
if ( HitTest(event.GetPosition()) != wxCAL_HITTEST_DAY )
|
||||
switch ( HitTest(event.GetPosition()) )
|
||||
{
|
||||
event.Skip();
|
||||
}
|
||||
else
|
||||
{
|
||||
GenerateEvent(wxEVT_CALENDAR_DOUBLECLICKED);
|
||||
case wxCAL_HITTEST_DAY:
|
||||
GenerateEvent(wxEVT_CALENDAR_DOUBLECLICKED);
|
||||
break;
|
||||
case wxCAL_HITTEST_DECMONTH:
|
||||
case wxCAL_HITTEST_INCMONTH:
|
||||
|
||||
// allow quickly clicking the inc/dec button any number of
|
||||
// times in a row by handling also the double-click event.
|
||||
OnClick(event);
|
||||
break;
|
||||
default:
|
||||
event.Skip();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user