From 49e0b673c32de3a1447242aad9d7b84299ed7859 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 7 Sep 2006 17:14:57 +0000 Subject: [PATCH] Update from Frank with fixes for running on wxMSW 2.7 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/wx/lib/combotreebox.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/wxPython/wx/lib/combotreebox.py b/wxPython/wx/lib/combotreebox.py index bdfd31034c..6817ae404b 100644 --- a/wxPython/wx/lib/combotreebox.py +++ b/wxPython/wx/lib/combotreebox.py @@ -37,8 +37,8 @@ workaround. Author: Frank Niessink Copyright 2006, Frank Niessink License: wxWidgets license -Version: 0.8 -Date: August 21, 2006 +Version: 0.9 +Date: September 6, 2006 """ import wx @@ -150,7 +150,7 @@ class IterableTreeCtrl(wx.TreeCtrl): # --------------------------------------------------------------------------- -class BasePopupFrame(wx.MiniFrame): +class BasePopupFrame(wx.Frame): """ BasePopupFrame is the base class for platform specific versions of the PopupFrame. The PopupFrame is the frame that @@ -450,6 +450,9 @@ class BaseComboTreeBox(object): item = self.FindClientData(clientData) if item: self._tree.SelectItem(item) + string = self._tree.GetItemText(item) + if self._text.GetValue() != string: + self._text.SetValue(string) return True else: return False @@ -718,6 +721,8 @@ class MSWComboTreeBox(NativeComboTreeBox): return events def OnSelectionChangedInTree(self, event): + if self.IsBeingDeleted(): + return item = event.GetItem() if item: selectedValue = self._tree.GetItemText(item)