more backports

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2007-05-08 02:34:23 +00:00
parent 9c57223c80
commit 03c88f6092
6 changed files with 89 additions and 57 deletions

View File

@@ -792,7 +792,7 @@ class XML_Tree(wx.TreeCtrl):
self.selection = None
g.tools.UpdateUI()
wx.TreeCtrl.UnselectAll(self)
wx.Yield()
#wx.Yield()
def ChangeSelection(self, item):
# Apply changes
@@ -1109,8 +1109,9 @@ class XML_Tree(wx.TreeCtrl):
n = 0 # index of sibling
prev = self.GetPrevSibling(item)
while prev.IsOk():
# MenuBar is not a child
if not isinstance(self.GetPyData(prev), xxxMenuBar):
# MenuBar and sizers are not real children (who else?)
if not isinstance(self.GetPyData(prev), xxxMenuBar) and not \
isinstance(self.GetPyData(prev), xxxSizer):
n += 1
prev = self.GetPrevSibling(prev)
return n