Allow wxWrapSizer to request more size than it used previously.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 22 Sep 2012 16:16:52 +0000 (16:16 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 22 Sep 2012 16:16:52 +0000 (16:16 +0000)
commit863dc042daf50d6a4eff0320208617f226ef92f0
treec66053bf0c3475c5b828d28a78adaedd38a09cfe
parent73eb7ca93ff0fcbf989cf3c64182839c740688bc
Allow wxWrapSizer to request more size than it used previously.

The code in wxWrapSizer::CalcMin() ensured that the sizer never requested more
space than what it had been already given which, while clearly done
intentionally, seems to be wrong because it can never end up with enough space
for all its rows/columns unless it is set to up to expand in the containing
sizer.

In other words, the old code could return the size which was not enough to
show the sizer contents fully which is against CalcMin() contract.

Change this by simply removing the check for the new minimal size being less
than the old one. This allows the wrap sizer demo in the layout sample to work
correctly whereas before the sizer contents was completely invisible initially.

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