X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0a81f130246a2c22a47e2eed31d1e640bf94e0fe..4681a3ea0d0502ec7a787bc4dd24e43718a02b7c:/src/msw/notebook.cpp diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index db3df7f538..1879bb2ba3 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -1314,10 +1314,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; }