fix bug in get-text-extent on zero-length string when neither descent or vertical space is requested
svn: r6776
This commit is contained in:
parent
f4b1315710
commit
b1233fb40c
|
@ -2214,14 +2214,14 @@ void wxDC::GetTextExtent(const char *string, double *x, double *y,
|
|||
once = 0;
|
||||
}
|
||||
|
||||
if (descent || topSpace)
|
||||
if (descent || topSpace || (!len && !ty))
|
||||
GetTextMetrics(dc, &tm);
|
||||
|
||||
DoneDC(dc);
|
||||
|
||||
*x = (double)tx;
|
||||
if (!len && !ty) {
|
||||
*y = (double)tm.tmHeight;;
|
||||
*y = (double)tm.tmHeight;
|
||||
} else {
|
||||
*y = (double)ty;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user