Use XOR operation to toggle the state of check box in wxPG.
Minor optimization by using single XOR operation instead of separate AND, OR operations to toggle the state of wxSimpleCheckBox. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
295549d95b
commit
3a87deed2a
@ -1571,10 +1571,7 @@ void wxSimpleCheckBox::SetValue( int value )
|
||||
{
|
||||
if ( value == wxSCB_SETVALUE_CYCLE )
|
||||
{
|
||||
if ( m_state & wxSCB_STATE_CHECKED )
|
||||
m_state &= ~wxSCB_STATE_CHECKED;
|
||||
else
|
||||
m_state |= wxSCB_STATE_CHECKED;
|
||||
m_state ^= wxSCB_STATE_CHECKED;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user