X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d7e2b52235d70e25d7797ce1dccd97fa6989f4b5..98ecc3aa689e1671e2771d773af66913cc54b959:/src/propgrid/property.cpp diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp index 31f6f9dd9a..3ca05b7db9 100644 --- a/src/propgrid/property.cpp +++ b/src/propgrid/property.cpp @@ -544,10 +544,8 @@ void wxPGProperty::InitAfterAdded( wxPropertyGridPageState* pageState, // Has initial children if ( GetChildCount() ) { - FlagType parentalFlags = m_flags & wxPG_PROP_PARENTAL_FLAGS; - // Check parental flags - wxASSERT_MSG( parentalFlags, + wxASSERT_MSG( (m_flags & wxPG_PROP_PARENTAL_FLAGS), "Call SetFlag(wxPG_PROP_MISC_PARENT) or" "SetFlag(wxPG_PROP_AGGREGATE) before calling" "wxPGProperty::AddChild()." ); @@ -858,13 +856,13 @@ void wxPGProperty::DoGenerateComposedValue( wxString& text, } } - // Remove superfluous semicolon and space - wxString rest; - if ( text.EndsWith(wxS("; "), &rest) ) - text = rest; - if ( (unsigned int)i < m_children.size() ) - text += wxS("; ..."); + { + if ( !text.EndsWith(wxS("; ")) ) + text += wxS("; ..."); + else + text += wxS("..."); + } } wxString wxPGProperty::ValueToString( wxVariant& WXUNUSED(value), @@ -1012,18 +1010,8 @@ bool wxPGProperty::StringToValue( wxVariant& variant, const wxString& text, int { if ( len > 0 ) { - bool wasUnspecified = child->IsValueUnspecified(); - if ( child->StringToValue(variant, token, propagatedFlags|wxPG_COMPOSITE_FRAGMENT) ) { - // Clear unspecified flag only if OnSetValue() didn't - // affect it. - if ( child->IsValueUnspecified() && - (wasUnspecified || !UsesAutoUnspecified()) ) - { - variant = child->GetDefaultValue(); - } - list.Append(variant); changed = true;