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.

See http://trac.wxwidgets.org/ticket/17193

(cherry picked from commit 148e8971c7)
This commit is contained in:
Lauri Nurmi
2017-04-14 17:38:38 +03:00
committed by Vadim Zeitlin
parent b6ad01d2a9
commit cc86c80495
2 changed files with 2 additions and 0 deletions

View File

@@ -679,6 +679,7 @@ wxOSX:
- Return false from wxSound::Create()/IsOk() if the file doesn't exist.
- Fix scrolling behaviour of wxSearchCtrl (John Roberts).
- Add wxTE_{RIGHT,CENTER} support for multiline wxTextCtrl (Andreas Falkenhahn).
- Fix changing year in wxCalendarCtrl using arrows (Lauri Nurmi).
3.0.2: (released 2014-10-06)

View File

@@ -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);
}