X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/63e0eeb581d65034c4861ac10d4a419ddea7386b..69cecdb1c42a0dc9736a8f7ab600330641598909:/src/propgrid/props.cpp diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp index fde73ced09..ea01f9b7a2 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -1034,9 +1034,7 @@ bool wxEnumProperty::ValueFromString_( wxVariant& value, const wxString& text, i // If text not any of the choices, store as text instead // (but only if we are wxEditEnumProperty) - if ( useIndex == -1 && - (value.GetType() != wxPG_VARIANT_TYPE_STRING || (m_value.GetString() != text)) && - isEdit ) + if ( useIndex == -1 && isEdit ) { asText = true; } @@ -1644,10 +1642,9 @@ wxFileProperty::wxFileProperty( const wxString& label, const wxString& name, wxFileProperty::~wxFileProperty() {} -#if wxUSE_VALIDATORS - wxValidator* wxFileProperty::GetClassValidator() { +#if wxUSE_VALIDATORS WX_PG_DOGETVALIDATOR_ENTRY() // Atleast wxPython 2.6.2.1 required that the string argument is given @@ -1665,6 +1662,9 @@ wxValidator* wxFileProperty::GetClassValidator() validator->SetExcludes(exChars); WX_PG_DOGETVALIDATOR_EXIT(validator) +#else + return NULL; +#endif } wxValidator* wxFileProperty::DoGetValidator() const @@ -1672,8 +1672,6 @@ wxValidator* wxFileProperty::DoGetValidator() const return GetClassValidator(); } -#endif - void wxFileProperty::OnSetValue() { const wxString& fnstr = m_value.GetString(); @@ -2120,12 +2118,14 @@ bool wxArrayEditorDialog::Create( wxWindow *parent, wxBoxSizer* rowsizer = new wxBoxSizer( wxHORIZONTAL ); m_edValue = new wxTextCtrl(this,21,wxEmptyString, wxDefaultPosition,wxDefaultSize,wxTE_PROCESS_ENTER); +#if wxUSE_VALIDATORS wxValidator* validator = GetTextCtrlValidator(); if ( validator ) { m_edValue->SetValidator( *validator ); delete validator; } +#endif rowsizer->Add( m_edValue, 1, wxALIGN_LEFT|wxALIGN_CENTRE_VERTICAL|wxALL, spacing ); @@ -2574,7 +2574,7 @@ bool wxArrayStringProperty::StringToValue( wxVariant& variant, const wxString& t // Need to replace backslashes with empty characters // (opposite what is done in GenerateValueString). - token.Replace ( wxS("\\"), wxEmptyString, true ); + token.Replace ( wxS("\\\\"), wxS("\\"), true ); arr.Add( token );