diff --git a/CHANGES.rst b/CHANGES.rst index 8135a199..6936ab9a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -25,6 +25,8 @@ This release provides the following fixes: * Switch to using a wx.Overlay in the Widget Inspection Tool to highlight widgets when running on a GTK3 port. +* Fixed issue in wx.lib.agw.customtreectrl where label editor could remain + stuck forever (#1235). 4.0.6 "Applesauce" diff --git a/wx/lib/agw/customtreectrl.py b/wx/lib/agw/customtreectrl.py index 69b827b4..3e13ef5e 100644 --- a/wx/lib/agw/customtreectrl.py +++ b/wx/lib/agw/customtreectrl.py @@ -7733,8 +7733,9 @@ class CustomTreeCtrl(wx.ScrolledWindow): if self._editCtrl != None and item != self._editCtrl.item(): self._editCtrl.StopEditing() - self._editCtrl = TreeTextCtrl(self, item=item) - self._editCtrl.SetFocus() + if self._editCtrl is None: + self._editCtrl = TreeTextCtrl(self, item=item) + self._editCtrl.SetFocus() def GetEditControl(self):