The checkbox doesn't eat the first "toggled" event if SetValue(FALSE) was

called any more. Added 2 lines to the controls sample to demonstrate it.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1998-12-17 20:24:44 +00:00
parent 79a773ba60
commit 8bf45ed12a
3 changed files with 12 additions and 0 deletions

View File

@@ -97,6 +97,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 );