]> git.saurik.com Git - wxWidgets.git/commitdiff
Set marks used in wxMSW wxCalendarCtrl unconditionally.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 11 Feb 2012 16:26:41 +0000 (16:26 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 11 Feb 2012 16:26:41 +0000 (16:26 +0000)
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

src/msw/calctrl.cpp

index 31ab4b65f13312d3f5bfd506c3d6fcdf1ab04832..b168a1b7d3599e0a2a1fa9bfb26e8a34454b4d1c 100644 (file)
@@ -120,8 +120,8 @@ wxCalendarCtrl::Create(wxWindow *parent,
 
     SetDate(dt.IsValid() ? dt : wxDateTime::Today());
 
-    if ( SetHolidayAttrs() )
-        UpdateMarks();
+    SetHolidayAttrs();
+    UpdateMarks();
 
     Connect(wxEVT_LEFT_DOWN,
             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
                         // them
-                        if ( SetHolidayAttrs() )
-                            UpdateMarks();
+                        SetHolidayAttrs();
+                        UpdateMarks();
                     }
                 }
             }