Merged
authorLaurent Bessard
Fri, 12 Apr 2013 12:12:20 +0200
changeset 1029 474484781eac
parent 1027 4e44c2c3e081 (current diff)
parent 1028 0ddbc39c91ee (diff)
child 1030 d9e75a5b5f08
Merged
--- a/IDEFrame.py	Fri Apr 12 14:53:14 2013 +0900
+++ b/IDEFrame.py	Fri Apr 12 12:12:20 2013 +0200
@@ -881,11 +881,10 @@
 
     def GetCopyBuffer(self, primary_selection=False):
         data = None
-        if primary_selection:
-            if wx.Platform != '__WXMSW__':
-                wx.TheClipboard.UsePrimarySelection(primary_selection)
-            else:
-                return data
+        if primary_selection and wx.Platform == '__WXMSW__':
+            return data
+        else:
+            wx.TheClipboard.UsePrimarySelection(primary_selection)
         if wx.TheClipboard.Open():
             dataobj = wx.TextDataObject()
             if wx.TheClipboard.GetData(dataobj):
@@ -894,11 +893,10 @@
         return data
         
     def SetCopyBuffer(self, text, primary_selection=False):
-        if primary_selection:
-            if wx.Platform != '__WXMSW__':
-                wx.TheClipboard.UsePrimarySelection(primary_selection)
-            else:
-                return
+        if primary_selection and wx.Platform == '__WXMSW__':
+            return
+        else:
+            wx.TheClipboard.UsePrimarySelection(primary_selection)
         if wx.TheClipboard.Open():
             data = wx.TextDataObject()
             data.SetText(text)