X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/232b2162776e08c0b16d5280b90f5c075f38c667..527983315d19b2fa3f7228ce1a82c1c852fba1c1:/src/generic/calctrlg.cpp diff --git a/src/generic/calctrlg.cpp b/src/generic/calctrlg.cpp index 21d116ccb1..effd171d21 100644 --- a/src/generic/calctrlg.cpp +++ b/src/generic/calctrlg.cpp @@ -1564,6 +1564,7 @@ wxCalendarHitTestResult wxGenericCalendarCtrl::HitTest(const wxPoint& pos, } if ( pos.x - x0 < 0 ) + { if ( pos.x >= 0 && pos.y > m_rowOffset + m_heightRow && pos.y <= m_rowOffset + m_heightRow * 7 ) { if ( date ) @@ -1577,6 +1578,7 @@ wxCalendarHitTestResult wxGenericCalendarCtrl::HitTest(const wxPoint& pos, } else // early exit -> the rest of the function checks for clicks on days return wxCAL_HITTEST_NOWHERE; + } // header: week days int wday = (pos.x - x0) / m_widthCol;