Reset the flag only if it is necessary

This commit is contained in:
Artur Wieczorek
2019-04-20 16:36:23 +02:00
parent e6e8f45051
commit fcc961b379

View File

@@ -142,8 +142,10 @@ bool wxStringProperty::DoSetAttribute( const wxString& name, wxVariant& value )
{
if ( name == wxPG_STRING_PASSWORD )
{
m_flags &= ~(wxPG_PROP_PASSWORD);
if ( value.GetLong() ) m_flags |= wxPG_PROP_PASSWORD;
if ( value.GetLong() )
m_flags |= wxPG_PROP_PASSWORD;
else
m_flags &= ~(wxPG_PROP_PASSWORD);
RecreateEditor();
return true;
}