Fix setting wxPG_PROP_STRING_PASSWORD attribute
For built-in attributes (like wxPG_PROP_STRING_PASSWORD) wxPGProperty::DoSetAttribute() should return true to give the option (controlled by wxPG_EX_WRITEONLY_BUILTIN_ATTRIBUTES style) to prevent the attribute from being stored into property's attribute storage.
This commit is contained in:
@@ -100,8 +100,9 @@ struct wxPGPaintData
|
|||||||
*/
|
*/
|
||||||
#define wxPG_FLOAT_PRECISION wxS("Precision")
|
#define wxPG_FLOAT_PRECISION wxS("Precision")
|
||||||
|
|
||||||
/** The text will be echoed as asterisks (wxTE_PASSWORD will be passed
|
/** Built-in attribute of type @c bool. Default value is @false,
|
||||||
to textctrl etc.).
|
When set tu @true, the text will be echoed as asterisks (wxTE_PASSWORD
|
||||||
|
will be passed to textctrl etc.).
|
||||||
*/
|
*/
|
||||||
#define wxPG_STRING_PASSWORD wxS("Password")
|
#define wxPG_STRING_PASSWORD wxS("Password")
|
||||||
|
|
||||||
|
@@ -145,9 +145,9 @@ bool wxStringProperty::DoSetAttribute( const wxString& name, wxVariant& value )
|
|||||||
m_flags &= ~(wxPG_PROP_PASSWORD);
|
m_flags &= ~(wxPG_PROP_PASSWORD);
|
||||||
if ( value.GetLong() ) m_flags |= wxPG_PROP_PASSWORD;
|
if ( value.GetLong() ) m_flags |= wxPG_PROP_PASSWORD;
|
||||||
RecreateEditor();
|
RecreateEditor();
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user