From: Roman Rolinsky Date: Fri, 9 Sep 2005 09:35:07 +0000 (+0000) Subject: testing for top-level objects only X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/14653d3b834c2563e016bdf1facd4fbe7d5fcb44?hp=96a9f4e8dddd8586b60a9c06aae32bf115f3a3d0 testing for top-level objects only git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/wx/tools/XRCed/CHANGES.txt b/wxPython/wx/tools/XRCed/CHANGES.txt index 0e6603c071..99c5cc8f0a 100644 --- a/wxPython/wx/tools/XRCed/CHANGES.txt +++ b/wxPython/wx/tools/XRCed/CHANGES.txt @@ -1,3 +1,9 @@ +0.1.6-5 +------- + +Testing limited to top-level objects because of references +problem until a nice solution is found. + 0.1.6-4 ------- diff --git a/wxPython/wx/tools/XRCed/tree.py b/wxPython/wx/tools/XRCed/tree.py index 55bbca94b5..408c8fb572 100644 --- a/wxPython/wx/tools/XRCed/tree.py +++ b/wxPython/wx/tools/XRCed/tree.py @@ -719,6 +719,9 @@ class XML_Tree(wxTreeCtrl): if g.panel.IsModified(): self.Apply(xxx, item) # apply changes treeObj = xxx.treeObject() + if self.GetItemParent(item) != self.root: + wxLogMessage('Only top-level objects can be tested') + return if treeObj.className not in ['wxFrame', 'wxPanel', 'wxDialog', 'wxMenuBar', 'wxToolBar', 'wxWizard', 'wxWizardPageSimple']: @@ -810,7 +813,6 @@ class XML_Tree(wxTreeCtrl): next = elem.nextSibling encd = self.rootObj.params['encoding'].value() if not encd: encd = None - self.dom.writexml(open('ttt.xrc','w'), encoding=encd) self.dom.writexml(memFile, encoding=encd) # Put back in place # Remove temporary name or restore changed