wxVariant list used to translate between list of property child values and composite value string now maps values by names instead of labels. Naturally this means properties can no longer have empty name (this change allows using identical labels under same parent property. Ported from wxpropgrid SVN trunk)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2008-09-14 13:14:32 +00:00
parent 1fb72f6116
commit d665918bd2
8 changed files with 45 additions and 42 deletions

View File

@@ -469,9 +469,9 @@ wxFontProperty::wxFontProperty( const wxString& label, const wxString& name,
wxFont& font = wxFontFromVariant(m_value);
AddChild( new wxIntProperty( _("Point Size"),emptyString,(long)font.GetPointSize() ) );
AddChild( new wxIntProperty( _("Point Size"), wxS("Point Size"),(long)font.GetPointSize() ) );
AddChild( new wxEnumProperty(_("Family"), emptyString,
AddChild( new wxEnumProperty(_("Family"), wxS("PointSize"),
gs_fp_es_family_labels,gs_fp_es_family_values,
font.GetFamily()) );
@@ -481,20 +481,20 @@ wxFontProperty::wxFontProperty( const wxString& label, const wxString& name,
wxPGGlobalVars->m_fontFamilyChoices->Index(faceName) == wxNOT_FOUND )
wxPGGlobalVars->m_fontFamilyChoices->AddAsSorted(faceName);
wxPGProperty* p = new wxEnumProperty(_("Face Name"),emptyString,
wxPGProperty* p = new wxEnumProperty(_("Face Name"), wxS("Face Name"),
*wxPGGlobalVars->m_fontFamilyChoices);
p->SetValueFromString(faceName, wxPG_FULL_VALUE);
AddChild( p );
AddChild( new wxEnumProperty(_("Style"),emptyString,
AddChild( new wxEnumProperty(_("Style"), wxS("Style"),
gs_fp_es_style_labels,gs_fp_es_style_values,font.GetStyle()) );
AddChild( new wxEnumProperty(_("Weight"),emptyString,
AddChild( new wxEnumProperty(_("Weight"), wxS("Weight"),
gs_fp_es_weight_labels,gs_fp_es_weight_values,font.GetWeight()) );
AddChild( new wxBoolProperty(_("Underlined"),emptyString,
AddChild( new wxBoolProperty(_("Underlined"), wxS("Underlined"),
font.GetUnderlined()) );
}