# HG changeset patch # User laurent # Date 1251817083 -7200 # Node ID 2160fd6d83ed77abda2569f307b4b79eb65fcaf3 # Parent 281fd35e7a7bb9e5dc8eab372f4100b1a1de358d Adding test for avoiding closing Clipboard when not opened diff -r 281fd35e7a7b -r 2160fd6d83ed PLCOpenEditor.py --- a/PLCOpenEditor.py Tue Sep 01 14:21:31 2009 +0200 +++ b/PLCOpenEditor.py Tue Sep 01 16:58:03 2009 +0200 @@ -822,6 +822,7 @@ dataobj = wx.TextDataObject() if wx.TheClipboard.GetData(dataobj): data = dataobj.GetText() + if wx.TheClipboard.IsOpened(): wx.TheClipboard.Close() return data @@ -831,6 +832,7 @@ data.SetText(text) wx.TheClipboard.SetData(data) wx.TheClipboard.Flush() + if wx.TheClipboard.IsOpened(): wx.TheClipboard.Close() self.RefreshEditMenu()