Don't always increase height in DoGetSizeFromTextSize()
The intention here almost certainly was to use at least the specified height, not to always add something to it at the end for no apparent reason, so do this instead.
This commit is contained in:
parent
3433eaafc2
commit
44e9218e03
1 changed files with 3 additions and 4 deletions
|
|
@ -2180,10 +2180,9 @@ wxSize wxTextCtrl::DoGetSizeFromTextSize(int xlen, int ylen) const
|
|||
}
|
||||
}
|
||||
|
||||
// Perhaps the user wants something different from CharHeight, or ylen
|
||||
// is used as the height of a multiline text.
|
||||
if ( ylen > 0 )
|
||||
tsize.IncBy(0, ylen - cHeight);
|
||||
// We should always use at least the specified height if it's valid.
|
||||
if ( ylen > tsize.y )
|
||||
tsize.y = ylen;
|
||||
|
||||
return tsize;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue