remove wxTextAttr::CreateFont(); return wxNullFont from GetFont() if we have no font attributes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
98a14ab488
commit
1fee6e2577
@ -278,9 +278,6 @@ public:
|
||||
// Partial equality test taking flags into account
|
||||
bool EqPartial(const wxTextAttr& attr, int flags) const;
|
||||
|
||||
// Create font from font attributes.
|
||||
wxFont CreateFont() const;
|
||||
|
||||
// Get attributes from font.
|
||||
bool GetFontAttributes(const wxFont& font, int flags = wxTEXT_ATTR_FONT);
|
||||
|
||||
@ -337,7 +334,7 @@ public:
|
||||
const wxString& GetFontFaceName() const { return m_fontFaceName; }
|
||||
wxFontEncoding GetFontEncoding() const { return m_fontEncoding; }
|
||||
|
||||
wxFont GetFont() const { return CreateFont(); }
|
||||
wxFont GetFont() const;
|
||||
|
||||
const wxString& GetCharacterStyleName() const { return m_characterStyleName; }
|
||||
const wxString& GetParagraphStyleName() const { return m_paragraphStyleName; }
|
||||
|
@ -297,8 +297,11 @@ bool wxTextAttr::EqPartial(const wxTextAttr& attr, int flags) const
|
||||
}
|
||||
|
||||
// Create font from font attributes.
|
||||
wxFont wxTextAttr::CreateFont() const
|
||||
wxFont wxTextAttr::GetFont() const
|
||||
{
|
||||
if ( !HasFont() )
|
||||
return wxNullFont;
|
||||
|
||||
int fontSize = 10;
|
||||
if (HasFontSize())
|
||||
fontSize = GetFontSize();
|
||||
|
Loading…
Reference in New Issue
Block a user