X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3096bd2fa7b88105bc54c08e3c878585de1a9b91..8d772832a04a3d2380ac6b3ffea6bfe6a72dcff6:/src/msw/notebook.cpp diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index aec8a9979a..8f6ad71029 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -83,7 +83,6 @@ // event table // ---------------------------------------------------------------------------- -#if !USE_SHARED_LIBRARIES BEGIN_EVENT_TABLE(wxNotebook, wxControl) EVT_NOTEBOOK_PAGE_CHANGED(-1, wxNotebook::OnSelChange) @@ -96,7 +95,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxNotifyEvent) -#endif // ============================================================================ // implementation @@ -329,6 +327,9 @@ bool wxNotebook::RemovePage(int nPage) m_aPages.Remove(nPage); + if ( m_aPages.IsEmpty() ) + m_nSelection = -1; + return TRUE; } @@ -344,6 +345,8 @@ bool wxNotebook::DeleteAllPages() TabCtrl_DeleteAllItems(m_hwnd); + m_nSelection = -1; + return TRUE; }