From 148e8971c7f4c931d6304de35e562c92d0b2c82f Mon Sep 17 00:00:00 2001 From: Lauri Nurmi Date: Fri, 14 Apr 2017 17:38:38 +0300 Subject: [PATCH] Fix the integer value in events generated by generic wxSpinCtrl This notably fixes the problem with changing the year using spin control arrows under macOS, where this control is used as part of wxGenericCalendarCtrl, as not having the correct value in the event object resulted in bogus events with dates in the year 0 there. Closes http://trac.wxwidgets.org/ticket/17193 --- src/generic/spinctlg.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/generic/spinctlg.cpp b/src/generic/spinctlg.cpp index f48ff32c2d..a5c87a93b7 100644 --- a/src/generic/spinctlg.cpp +++ b/src/generic/spinctlg.cpp @@ -96,6 +96,7 @@ public: wxCommandEvent eventCopy(event); eventCopy.SetEventObject(m_spin); eventCopy.SetId(m_spin->GetId()); + eventCopy.SetInt(wxAtoi(event.GetString())); m_spin->ProcessWindowEvent(eventCopy); }