From 4b7887a953e5d02b240042510bcfa10f5f2ce41a Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 22 Apr 2005 14:30:03 +0000 Subject: [PATCH] some bugs in the demo fixed git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/demo/SplitTree.py | 2 +- wxPython/demo/TreeCtrl.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wxPython/demo/SplitTree.py b/wxPython/demo/SplitTree.py index 0a73acdacb..0f7b4da9e4 100644 --- a/wxPython/demo/SplitTree.py +++ b/wxPython/demo/SplitTree.py @@ -105,7 +105,7 @@ class TestPanel(wx.Panel): valueWindow = TestValueWindow(splitter, style=wx.NO_BORDER) - splitter.SplitVertically(tree, valueWindow, 150) + wx.CallAfter(splitter.SplitVertically, tree, valueWindow, 150) scroller.SetTargetWindow(tree) scroller.EnableScrolling(False, False) diff --git a/wxPython/demo/TreeCtrl.py b/wxPython/demo/TreeCtrl.py index 13137d648d..f36a659521 100644 --- a/wxPython/demo/TreeCtrl.py +++ b/wxPython/demo/TreeCtrl.py @@ -146,7 +146,8 @@ class TestTreeCtrlPanel(wx.Panel): if item: self.log.WriteText("OnLeftDClick: %s\n" % self.tree.GetItemText(item)) parent = self.tree.GetItemParent(item) - self.tree.SortChildren(parent) + if parent.IsOk(): + self.tree.SortChildren(parent) event.Skip() -- 2.45.2