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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user