X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0a81f130246a2c22a47e2eed31d1e640bf94e0fe..24fb46ea48f1dc7d185b5cdf551077cdcc533d54:/src/msw/notebook.cpp diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index db3df7f538..e69fd60c43 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -138,8 +138,6 @@ END_EVENT_TABLE() // common part of all ctors void wxNotebook::Init() { - m_imageList = NULL; - #if wxUSE_UXTHEME m_hbrBackground = NULL; #endif // wxUSE_UXTHEME @@ -1314,10 +1312,12 @@ bool wxNotebook::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM* result) event.SetEventObject(this); event.SetInt(idCtrl); - bool processed = HandleWindowEvent(event); + // Change the selection before generating the event as its handler should + // already see the new page selected. if ( hdr->code == TCN_SELCHANGE ) UpdateSelection(event.GetSelection()); + bool processed = HandleWindowEvent(event); *result = !event.IsAllowed(); return processed; }