From 984238305bed46b5e9897cca1fde71da54704fc5 Mon Sep 17 00:00:00 2001 From: Tim Kosse Date: Mon, 5 Jan 2015 12:48:45 +0000 Subject: [PATCH] On wxMac, modal event loops avoid deleting pending events. 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/trunk@78349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/treectlg.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index a5e73c39c4..383e6fde04 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -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)