Only use fonts in wxTextAttr::Combine if they are really present in the attributes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52365 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2008-03-07 08:55:12 +00:00
parent 2e10110af0
commit 7c3c990ecf

View File

@@ -542,10 +542,14 @@ wxTextAttr wxTextAttr::Combine(const wxTextAttr& attr,
const wxTextAttr& attrDef,
const wxTextCtrlBase *text)
{
wxFont font = attr.GetFont();
wxFont font;
if (attr.HasFont())
font = attr.GetFont();
if ( !font.Ok() )
{
font = attrDef.GetFont();
if (attrDef.HasFont())
font = attrDef.GetFont();
if ( text && !font.Ok() )
font = text->GetFont();