Allow constructing wxGTK wxTextMeasure with NULL font.
The font is explicitly documented as being possibly NULL in the base class and wxMSW handles NULL font just fine, so also handle it in the GTK version. See #14706. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -53,6 +53,13 @@ wxTextMeasureBase::wxTextMeasureBase(const wxWindow *win, const wxFont *theFont)
|
||||
m_useDCImpl = false;
|
||||
}
|
||||
|
||||
wxFont wxTextMeasureBase::GetFont() const
|
||||
{
|
||||
return m_font ? *m_font
|
||||
: m_win ? m_win->GetFont()
|
||||
: m_dc->GetFont();
|
||||
}
|
||||
|
||||
void wxTextMeasureBase::CallGetTextExtent(const wxString& string,
|
||||
wxCoord *width,
|
||||
wxCoord *height,
|
||||
|
||||
Reference in New Issue
Block a user