X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/175363f6b89e94e6d5f7dc39235fbc3f2989d763..404b319a85dadd7decf7a5a5331020520031a41c:/src/generic/toolbkg.cpp diff --git a/src/generic/toolbkg.cpp b/src/generic/toolbkg.cpp index b88e45b9cd..8ba3ac9325 100644 --- a/src/generic/toolbkg.cpp +++ b/src/generic/toolbkg.cpp @@ -64,7 +64,6 @@ END_EVENT_TABLE() void wxToolbook::Init() { - m_selection = wxNOT_FOUND; m_needsRealizing = false; } @@ -201,11 +200,6 @@ void wxToolbook::SetImageList(wxImageList *imageList) // selection // ---------------------------------------------------------------------------- -int wxToolbook::GetSelection() const -{ - return m_selection; -} - wxBookCtrlEvent* wxToolbook::CreatePageChangingEvent() const { return new wxBookCtrlEvent(wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING, m_windowId); @@ -235,13 +229,13 @@ void wxToolbook::Realize() GetToolBar()->Realize(); } - if (m_selection == -1) + if (m_selection == wxNOT_FOUND) m_selection = 0; if (GetPageCount() > 0) { int sel = m_selection; - m_selection = -1; + m_selection = wxNOT_FOUND; SetSelection(sel); } @@ -352,7 +346,7 @@ wxWindow *wxToolbook::DoRemovePage(size_t page) int sel = m_selection - 1; if (page_count == 1) sel = wxNOT_FOUND; - else if ((page_count == 2) || (sel == -1)) + else if ((page_count == 2) || (sel == wxNOT_FOUND)) sel = 0; // force sel invalid if deleting current page - don't try to hide it