Make wxBookCtrlBase::GetPage() virtual to fix it for wxAuiNotebook.

wxAuiNotebook doesn't store its page in the base class m_pages array, so
calling GetPage() on it via a wxBookCtrl pointer resulted in a crash.

Make GetPage() virtual to allow overriding it at wxAuiNotebook level.

Closes #13768.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2012-06-30 23:41:27 +00:00
parent c55488dfff
commit 005b12d8be
2 changed files with 3 additions and 3 deletions

View File

@ -289,8 +289,8 @@ public:
bool DeletePage(size_t page);
bool RemovePage(size_t page);
size_t GetPageCount() const;
wxWindow* GetPage(size_t pageIdx) const;
virtual size_t GetPageCount() const;
virtual wxWindow* GetPage(size_t pageIdx) const;
int GetPageIndex(wxWindow* pageWnd) const;
bool SetPageText(size_t page, const wxString& text);

View File

@ -95,7 +95,7 @@ public:
virtual size_t GetPageCount() const { return m_pages.size(); }
// get the panel which represents the given page
wxWindow *GetPage(size_t n) const { return m_pages[n]; }
virtual wxWindow *GetPage(size_t n) const { return m_pages[n]; }
// get the current page or NULL if none
wxWindow *GetCurrentPage() const