Allow retrieving the descent and external leading of empty strings.
This used to work before wxTextMeasure changes so make it work again instead of optimizing the case of empty string away and not returning anything in the descent and externalLeading output parameters in this case. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74464 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -86,7 +86,9 @@ void wxTextMeasureBase::GetTextExtent(const wxString& string,
|
||||
if ( !height )
|
||||
height = &unusedHeight;
|
||||
|
||||
if ( string.empty() )
|
||||
// Avoid even setting up the DC for measuring if we don't actually need to
|
||||
// measure anything.
|
||||
if ( string.empty() && !descent && !externalLeading )
|
||||
{
|
||||
*width =
|
||||
*height = 0;
|
||||
|
||||
Reference in New Issue
Block a user