Fix wxComboCtrlBase::DoGetSizeFromTextSize() performance regression.
authorVáclav Slavík <vslavik@fastmail.fm>
Wed, 14 Aug 2013 15:47:21 +0000 (15:47 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Wed, 14 Aug 2013 15:47:21 +0000 (15:47 +0000)
commit69c7c9375c99ab99691e748b6e4b792ba9d45684
tree5f5450017db6b2dc828c12fe33f6fbf788fca343
parent28f058d35ea6c3debb7d95c12ffea075c48b006b
Fix wxComboCtrlBase::DoGetSizeFromTextSize() performance regression.

r72935 introduced code that created a temporary wxComboBox control to
take measurements. This is very expensive in MSW and adds noticeable
delay when creating more than a few controls.

Replace with equivalent wxMSW code that computes the height in the same
way other wxMSW controls do.

The wxGTK version cannot be eliminated in the same way, so at least add
some basic caching there. It's much less of a problem, because GTK+
controls creation is much cheaper than MSW one.

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