Simplify wxGridCellAutoWrapStringRenderer::GetBestSize().
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 4 Sep 2013 00:14:10 +0000 (00:14 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 4 Sep 2013 00:14:10 +0000 (00:14 +0000)
commit8965331963a7fbe038caeadab27da643f8391a42
treef41f1207cb4bc926ecc8c84248247f96ad0f12fc
parent85d2dec9f022748a678a3534851b8dcf76c56fa8
Simplify wxGridCellAutoWrapStringRenderer::GetBestSize().

The code there was pretty wild, making clearly wrong assumptions (column size
doesn't, and AFAICS never did, include 20 pixel margin) and also was clearly
uncertain about what it was doing by trying to limit the number of iterations
to some arbitrary cutoff when it is pretty clear that the loop increasing the
width and decreasing the height on each iteration will reach the condition of
"width >= height*1.68" sooner or later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/generic/gridctrl.cpp