Remove assert checking for valid font in wxMSW wxDC::GetTextExtent().
It wasn't there before wxTextMEasure changes and it doesn't seem obvious why should it be there, it should be possible to measure the text using the default wxDC font without setting one explicitly. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1867,8 +1867,6 @@ void wxMSWDCImpl::DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y
|
|||||||
|
|
||||||
bool wxMSWDCImpl::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const
|
bool wxMSWDCImpl::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( GetFont().IsOk(), false, wxT("Invalid font") );
|
|
||||||
|
|
||||||
wxTextMeasure txm(GetOwner(), NULL); // don't change the font
|
wxTextMeasure txm(GetOwner(), NULL); // don't change the font
|
||||||
return txm.GetPartialTextExtents(text, widths, 1.0);
|
return txm.GetPartialTextExtents(text, widths, 1.0);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user