X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a6aa9b1ee8aaecdf0ca4618c2e6cccfb011f4599..7b9da2077d0975db6c965a85c91d5aca671ab5e3:/src/msw/notebook.cpp?ds=sidebyside diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index 4dd386361c..d2fe79e557 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -22,16 +22,16 @@ // wxWindows #ifndef WX_PRECOMP - #include + #include "wx/string.h" #endif // WX_PRECOMP -#include -#include -#include -#include -#include +#include "wx/log.h" +#include "wx/imaglist.h" +#include "wx/event.h" +#include "wx/control.h" +#include "wx/notebook.h" -#include +#include "wx/msw/private.h" // Windows standard headers #ifndef __WIN95__ @@ -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; }