X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3096bd2fa7b88105bc54c08e3c878585de1a9b91..e959aee256848b44a21cc9fe95570dab55c51658:/src/msw/notebook.cpp diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index aec8a9979a..d2fe79e557 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -329,6 +329,9 @@ bool wxNotebook::RemovePage(int nPage) m_aPages.Remove(nPage); + if ( m_aPages.IsEmpty() ) + m_nSelection = -1; + return TRUE; } @@ -344,6 +347,8 @@ bool wxNotebook::DeleteAllPages() TabCtrl_DeleteAllItems(m_hwnd); + m_nSelection = -1; + return TRUE; }