From 1893848ef7cc03146e49849e388de30447cdee71 Mon Sep 17 00:00:00 2001 From: Roman Rolinsky Date: Tue, 14 Feb 2006 20:58:11 +0000 Subject: [PATCH] fix for memory leak in paste git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/wx/tools/XRCed/globals.py | 2 +- wxPython/wx/tools/XRCed/xrced.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wxPython/wx/tools/XRCed/globals.py b/wxPython/wx/tools/XRCed/globals.py index ece468e8ce..a81d987e2a 100644 --- a/wxPython/wx/tools/XRCed/globals.py +++ b/wxPython/wx/tools/XRCed/globals.py @@ -15,7 +15,7 @@ import sys # Global constants progname = 'XRCed' -version = '0.1.7-0' +version = '0.1.7-1' # Minimal wxWindows version MinWxVersion = (2,6,0) if wxVERSION[:3] < MinWxVersion: diff --git a/wxPython/wx/tools/XRCed/xrced.py b/wxPython/wx/tools/XRCed/xrced.py index fcc27120a7..e4056b7844 100644 --- a/wxPython/wx/tools/XRCed/xrced.py +++ b/wxPython/wx/tools/XRCed/xrced.py @@ -415,7 +415,7 @@ class Frame(wxFrame): xxx = tree.GetPyData(selected) wx.TheClipboard.Open() data = wx.CustomDataObject('XRCED') - data.SetData(cPickle.dumps(xxx.element)) + data.SetData(cPickle.dumps(xxx.element.toxml())) wx.TheClipboard.SetData(data) wx.TheClipboard.Close() self.SetStatusText('Copied') @@ -455,10 +455,10 @@ class Frame(wxFrame): return wx.TheClipboard.GetData(data) wx.TheClipboard.Close() - elem = cPickle.loads(data.GetData()) + xml = cPickle.loads(data.GetData()) # xml representation of element + elem = minidom.parseString(xml).childNodes[0] # Tempopary xxx object to test things xxx = MakeXXXFromDOM(parent, elem) - # Check compatibility error = False # Top-level @@ -925,7 +925,7 @@ Homepage: http://xrced.sourceforge.net\ # Update tools g.tools.UpdateUI() - #undoMan.RegisterUndo(UndoPasteCreate(parentLeaf, parent, newItem, selected)) + undoMan.RegisterUndo(UndoPasteCreate(parentLeaf, parent, newItem, selected)) # Update view? if g.testWin and tree.IsHighlatable(selected): if conf.autoRefresh: -- 2.45.2