]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/tools/XRCed/tree.py
Compile fixes for Panther
[wxWidgets.git] / wxPython / wx / tools / XRCed / tree.py
index 5db6f8c7e9859c087691122cf88fdd7c08ebb576..26e8b91a8a9a0fb6a5e3439a76c016462ab81b6d 100644 (file)
@@ -692,7 +692,8 @@ class XML_Tree(wx.TreeCtrl):
         #oldItem = evt.GetOldItem()
         status = ''
         oldItem = self.selection
-        if oldItem:
+        # use GetItemParent as a way to determine if the itemId is still valid
+        if oldItem and self.GetItemParent(oldItem):
             xxx = self.GetPyData(oldItem)
             # If some data was modified, apply changes
             if g.panel.IsModified():
@@ -864,7 +865,6 @@ class XML_Tree(wx.TreeCtrl):
             inf = sys.exc_info()
             wx.LogError(traceback.format_exception(inf[0], inf[1], None)[-1])
             wx.LogError('Error writing temporary file')
-            if debug: raise            
         memFile.close()                 # write to wxMemoryFS
         xmlFlags = xrc.XRC_NO_SUBCLASSING
         # Use translations if encoding is not specified