X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b318dc42374cfb58878c779447c9d0a6fc79eb1d..278c927dd9d163dd67d90cd5e01e77fecfcbac91:/src/gtk1/notebook.cpp diff --git a/src/gtk1/notebook.cpp b/src/gtk1/notebook.cpp index fe5e541720..4439cbae46 100644 --- a/src/gtk1/notebook.cpp +++ b/src/gtk1/notebook.cpp @@ -86,14 +86,12 @@ static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget), gint page, wxNotebook *notebook ) { - static bool s_inPageChange = FALSE; - // are you trying to call SetSelection() from a notebook event handler? // you shouldn't! - wxCHECK_RET( !s_inPageChange, + wxCHECK_RET( !notebook->m_inSwitchPage, _T("gtk_notebook_page_change_callback reentered") ); - s_inPageChange = TRUE; + notebook->m_inSwitchPage = TRUE; if (g_isIdle) wxapp_install_idle_handler(); @@ -123,7 +121,7 @@ static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget), notebook->GetEventHandler()->ProcessEvent( eventChanged ); } - s_inPageChange = FALSE; + notebook->m_inSwitchPage = FALSE; } //----------------------------------------------------------------------------- @@ -236,6 +234,8 @@ END_EVENT_TABLE() void wxNotebook::Init() { m_padding = 0; + m_inSwitchPage = FALSE; + m_imageList = (wxImageList *) NULL; m_pagesData.DeleteContents( TRUE ); m_selection = -1;