Accept "default" as font family value in XRC.

Map it to wxFONTFAMILY_DEFAULT, just as we do for all other wxFontFamily enum
elements.

Closes #16549.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-09-12 11:31:25 +00:00
parent c8e27bcaf7
commit 1447a23c83
2 changed files with 4 additions and 3 deletions

View File

@@ -2285,7 +2285,8 @@ wxFont wxXmlResourceHandlerImpl::GetFont(const wxString& param, wxWindow* parent
if (hasFamily)
{
wxString family = GetParamValue(wxT("family"));
if (family == wxT("decorative")) ifamily = wxFONTFAMILY_DECORATIVE;
if (family == wxT("default")) ifamily = wxFONTFAMILY_DEFAULT;
else if (family == wxT("decorative")) ifamily = wxFONTFAMILY_DECORATIVE;
else if (family == wxT("roman")) ifamily = wxFONTFAMILY_ROMAN;
else if (family == wxT("script")) ifamily = wxFONTFAMILY_SCRIPT;
else if (family == wxT("swiss")) ifamily = wxFONTFAMILY_SWISS;