diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp index 7c6a523bca..fe276bf866 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -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; }