From: Robin Dunn Date: Fri, 22 Apr 2005 14:30:03 +0000 (+0000) Subject: some bugs in the demo fixed X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4b7887a953e5d02b240042510bcfa10f5f2ce41a some bugs in the demo fixed git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- 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()