On wxMac, modal event loops avoid deleting pending objects. Hide the text control after editing a label in the generic tree control so it does not remain visible e.g. if the tree control is used in a dialog.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Tim Kosse
2015-01-05 12:49:41 +00:00
parent ef5232d289
commit 440e477ea7

View File

@@ -515,6 +515,13 @@ void wxTreeTextCtrl::Finish( bool setfocus )
{
m_owner->ResetTextControl();
#ifdef __WXMAC__
// On wxMac, modal event loops avoid deleting pending objects.
// Hide control so it does not remain visible e.g. if the tree
// control is used in a dialog.
Hide();
#endif
wxPendingDelete.Append(this);
if (setfocus)