X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b292e2f512fa9b25e2d2928604ab884b00e6c6bf..657865d295e327e679d3ea493cff6fb1ca50cd3c:/src/gtk/checkbox.cpp diff --git a/src/gtk/checkbox.cpp b/src/gtk/checkbox.cpp index daafd5f43f..85425761d0 100644 --- a/src/gtk/checkbox.cpp +++ b/src/gtk/checkbox.cpp @@ -14,6 +14,9 @@ #include "wx/checkbox.h" +#include "gdk/gdk.h" +#include "gtk/gtk.h" + //----------------------------------------------------------------------------- // data //----------------------------------------------------------------------------- @@ -97,6 +100,11 @@ void wxCheckBox::SetValue( bool state ) { wxCHECK_RET( m_widget != NULL, "invalid checkbox" ); + if ( state == GetValue() ) + return; + + // for compatibility with wxMSW don't send notification when the check box + // state is changed programmatically m_blockFirstEvent = TRUE; gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_widget), state );