Destroy the in-place edit control in wxGenericListCtrl dtor.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 5 Oct 2010 13:38:05 +0000 (13:38 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 5 Oct 2010 13:38:05 +0000 (13:38 +0000)
commit93f6e00d7b98869ef38f05113550ac0c11bf0102
treedd4696858650fd04a6de00a7e4aabb28ab940f46
parent9a1ff9516c2686c0bf991c5ac7b370c09c85edab
Destroy the in-place edit control in wxGenericListCtrl dtor.

If the in-place text control was still alive when wxGenericListCtrl was
destroyed, it resulted in asserts from wxWindow dtor about child windows still
being alive, so explicitly destroy it from wxListMainWindow dtor.

As this required a slightly different behaviour from wxListTextCtrlWrapper::
EndEdit(), replace its bool argument with an enum one which can take more than
2 values. Not using bool values when calling it also made the code more clear.

Finally, added a unit test verifying that the in-place control is indeed
destroyed correctly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/generic/private/listctrl.h
src/generic/listctrl.cpp
tests/controls/listctrltest.cpp