// 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()." );
}
}
- // 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),
{
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;