Restore generic GetPartialTextExtents() version use in wxGTK and wxMSW.
Non-wxWindowDC-derived wxDC classes in wxGTK, such as wxGtkPrinterDCImpl, have to fall back on the generic implementation of GetPartialTextExtents() as Pango version can't be used with them. This fixes a crash due to using NULL Pango layout when printing wxRichTextCtrl in wxGTK. Closes #14847. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -165,8 +165,11 @@ void wxTextMeasure::DoGetTextExtent(const wxString& string,
|
||||
|
||||
bool wxTextMeasure::DoGetPartialTextExtents(const wxString& text,
|
||||
wxArrayInt& widths,
|
||||
double WXUNUSED(scaleX))
|
||||
double scaleX)
|
||||
{
|
||||
if ( !m_layout )
|
||||
return wxTextMeasureBase::DoGetPartialTextExtents(text, widths, scaleX);
|
||||
|
||||
// Set layout's text
|
||||
const wxCharBuffer dataUTF8 = wxGTK_CONV_FONT(text, GetFont());
|
||||
if ( !dataUTF8 )
|
||||
|
||||
Reference in New Issue
Block a user