]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/notebook.cpp
non-pch build fix
[wxWidgets.git] / src / msw / notebook.cpp
index 05a1136e4a3dfaded1b05a3c71ed9ea4fdb56148..4b3c6e0aee779b1c396d1a46ca4954cb85ac35db 100644 (file)
@@ -454,11 +454,13 @@ int wxNotebook::SetSelection(size_t nPage)
         if ( SendPageChangingEvent(nPage) )
         {
             // program allows the page change
-            SendPageChangedEvent(m_selection, nPage);
+            const int selectionOld = m_selection;
 
             UpdateSelection(nPage);
 
             TabCtrl_SetCurSel(GetHwnd(), nPage);
+
+            SendPageChangedEvent(selectionOld, nPage);
         }
     }