From 00953cf010e380f4c7633799d0da602eba0add94 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 9 Oct 2011 22:07:32 +0000 Subject: [PATCH] Don't declare wxCairoFontData::m_underlined unnecessarily. This member was only used in wxGTK-specific code but it was declared for all platforms which was unnecessary and confusing. Move its declaration in wxGTK-only section of the class. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69361 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/graphicc.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index 1e6c1f6ac7..f203bdec3c 100644 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -301,7 +301,6 @@ private : cairo_font_weight_t weight); double m_size; - bool m_underlined; double m_red; double m_green; double m_blue; @@ -310,6 +309,7 @@ private : cairo_font_face_t *m_font; #elif defined(__WXGTK__) PangoFontDescription* m_font; + bool m_underlined; #endif // These members are used when the font is created from its face name and @@ -850,12 +850,12 @@ wxCairoFontData::wxCairoFontData( wxGraphicsRenderer* renderer, const wxFont &fo InitColour(col); m_size = font.GetPointSize(); - m_underlined = font.GetUnderlined(); #ifdef __WXMAC__ m_font = cairo_quartz_font_face_create_for_cgfont( font.OSXGetCGFont() ); #elif defined(__WXGTK__) m_font = pango_font_description_copy( font.GetNativeFontInfo()->description ); + m_underlined = font.GetUnderlined(); #else InitFontComponents ( @@ -886,7 +886,8 @@ wxCairoFontData::wxCairoFontData(wxGraphicsRenderer* renderer, m_font = NULL; #endif - m_underlined = (flags & wxFONTFLAG_UNDERLINED) != 0; + // There is no need to set m_underlined under wxGTK in this case, it can + // only be used if m_font != NULL. InitFontComponents ( -- 2.45.2