X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad81651f00edc6f489d9b6a0839d316a964fd521..342751763793b5cdad252d731aac0618d0674e5b:/src/msw/notebook.cpp diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index 8f6ad71029..185a915c58 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -83,7 +83,7 @@ // event table // ---------------------------------------------------------------------------- - BEGIN_EVENT_TABLE(wxNotebook, wxControl) +BEGIN_EVENT_TABLE(wxNotebook, wxControl) EVT_NOTEBOOK_PAGE_CHANGED(-1, wxNotebook::OnSelChange) EVT_SIZE(wxNotebook::OnSize) @@ -91,10 +91,10 @@ EVT_SET_FOCUS(wxNotebook::OnSetFocus) EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey) - END_EVENT_TABLE() +END_EVENT_TABLE() - IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl) - IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxNotifyEvent) +IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxNotifyEvent) // ============================================================================ // implementation @@ -314,6 +314,9 @@ bool wxNotebook::DeletePage(int nPage) // no selection if the notebook became empty m_nSelection = -1; } + else + m_nSelection = TabCtrl_GetCurSel(m_hwnd); + return TRUE; } @@ -329,6 +332,8 @@ bool wxNotebook::RemovePage(int nPage) if ( m_aPages.IsEmpty() ) m_nSelection = -1; + else + m_nSelection = TabCtrl_GetCurSel(m_hwnd); return TRUE; }