X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad81651f00edc6f489d9b6a0839d316a964fd521..2a31049201e9c1ff9f515eb9d144ae392f4b4e5a:/src/msw/notebook.cpp diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index 8f6ad71029..43b70d1dbb 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -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; }