# HG changeset patch
# User Laurent Bessard
# Date 1365619679 -7200
# Node ID 0ddbc39c91eea471fb10c0f9952d796c782f48f5
# Parent  96a2dc05651a1577cc71915650dd8678c14842db
Fixed bug with diagram copy

diff -r 96a2dc05651a -r 0ddbc39c91ee IDEFrame.py
--- a/IDEFrame.py	Tue Apr 09 18:42:47 2013 +0200
+++ b/IDEFrame.py	Wed Apr 10 20:47:59 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)