Set marks used in wxMSW wxCalendarCtrl unconditionally.

This fixes wrong display (random days could have been shown marked) when not
using wxCAL_SHOW_HOLIDAYS style. Apparently we need to set the marks
unconditionally as they are not turned off by default, so ensure we call
UpdateMarks() even without wxCAL_SHOW_HOLIDAYS.

See #13934.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-02-11 16:26:41 +00:00
parent e9270aaac8
commit 169b83dd23

View File

@@ -120,8 +120,8 @@ wxCalendarCtrl::Create(wxWindow *parent,
SetDate(dt.IsValid() ? dt : wxDateTime::Today()); SetDate(dt.IsValid() ? dt : wxDateTime::Today());
if ( SetHolidayAttrs() ) SetHolidayAttrs();
UpdateMarks(); UpdateMarks();
Connect(wxEVT_LEFT_DOWN, Connect(wxEVT_LEFT_DOWN,
wxMouseEventHandler(wxCalendarCtrl::MSWOnClick)); wxMouseEventHandler(wxCalendarCtrl::MSWOnClick));
@@ -462,8 +462,8 @@ bool wxCalendarCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
{ {
// month changed, need to update the holidays if we use // month changed, need to update the holidays if we use
// them // them
if ( SetHolidayAttrs() ) SetHolidayAttrs();
UpdateMarks(); UpdateMarks();
} }
} }
} }