# HG changeset patch # User Laurent Bessard # Date 1345898689 -7200 # Node ID ecd2effd4660e1fab2a76657db7c9ac44a18ecaa # Parent bebdef08f684669ff7b0569afb6915d4be75f374 Fix bug with Clipboard that generated segmentation fault when closing dialogs diff -r bebdef08f684 -r ecd2effd4660 PLCOpenEditor.py --- a/PLCOpenEditor.py Tue Aug 21 18:41:17 2012 +0200 +++ b/PLCOpenEditor.py Sat Aug 25 14:44:49 2012 +0200 @@ -1096,21 +1096,19 @@ def GetCopyBuffer(self): data = None - if wx.TheClipboard.IsOpened() or wx.TheClipboard.Open(): + if wx.TheClipboard.Open(): dataobj = wx.TextDataObject() if wx.TheClipboard.GetData(dataobj): data = dataobj.GetText() - if wx.TheClipboard.IsOpened(): wx.TheClipboard.Close() return data def SetCopyBuffer(self, text): - if wx.TheClipboard.IsOpened() or wx.TheClipboard.Open(): + if wx.TheClipboard.Open(): data = wx.TextDataObject() data.SetText(text) wx.TheClipboard.SetData(data) wx.TheClipboard.Flush() - if wx.TheClipboard.IsOpened(): wx.TheClipboard.Close() self.RefreshEditMenu() diff -r bebdef08f684 -r ecd2effd4660 Viewer.py --- a/Viewer.py Tue Aug 21 18:41:17 2012 +0200 +++ b/Viewer.py Sat Aug 25 14:44:49 2012 +0200 @@ -927,7 +927,7 @@ if self.ParentWindow: self.ParentWindow.RefreshTitle() self.ParentWindow.RefreshFileMenu() - wx.CallAfter(self.ParentWindow.RefreshEditMenu) + self.ParentWindow.RefreshEditMenu() def StartBuffering(self): if not self.Buffering: