X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7e837615b95205297821dc0b85791ad9e0055df6..30d6c59b297f98ebda1d6c14e56f289bd3b02799:/src/gtk1/notebook.cpp?ds=sidebyside diff --git a/src/gtk1/notebook.cpp b/src/gtk1/notebook.cpp index 5b2099a4e6..780ef4d3db 100644 --- a/src/gtk1/notebook.cpp +++ b/src/gtk1/notebook.cpp @@ -107,7 +107,7 @@ static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget), // make wxNotebook::GetSelection() return the correct (i.e. consistent // with wxBookCtrlEvent::GetSelection()) value even though the page is // not really changed in GTK+ - notebook->m_selection = page; + notebook->SetSelection(page); } else { @@ -121,7 +121,7 @@ static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget), // make wxNotebook::GetSelection() return the correct (i.e. consistent // with wxBookCtrlEvent::GetSelection()) value even though the page is // not really changed in GTK+ - notebook->m_selection = page; + notebook->SetSelection(page); notebook->SendPageChangedEvent(old); } @@ -292,7 +292,6 @@ void wxNotebook::Init() m_inSwitchPage = false; m_imageList = NULL; - m_selection = -1; m_themeEnabled = true; } @@ -375,8 +374,8 @@ int wxNotebook::GetSelection() const gpointer cur = notebook->cur_page; if ( cur != NULL ) { - wxConstCast(this, wxNotebook)->m_selection = - g_list_index( nb_pages, cur ); + const_cast(this)-> + SetSelection(g_list_index( nb_pages, cur )); } } }