Use dedicated function to change wxPGProperty flags

Using wxPGProperty::ChangeFlag() function makes the code simpler and more readable.
This commit is contained in:
Artur Wieczorek
2019-04-28 16:38:47 +02:00
parent bd313b64ab
commit 50b1cfd0b5
4 changed files with 11 additions and 41 deletions

View File

@@ -1593,11 +1593,7 @@ bool wxSystemColourProperty::DoSetAttribute( const wxString& name, wxVariant& va
}
else if ( name == wxPG_COLOUR_HAS_ALPHA )
{
if ( value.GetBool() )
m_flags |= wxPG_PROP_COLOUR_HAS_ALPHA;
else
m_flags &= ~(wxPG_PROP_COLOUR_HAS_ALPHA);
ChangeFlag(wxPG_PROP_COLOUR_HAS_ALPHA, value.GetBool());
return true;
}
return wxEnumProperty::DoSetAttribute(name, value);