boolean for internal copies
authoramwaterhouse <Andrew Waterhouse>
Tue, 23 Jan 2007 17:24:13 +0000 (17:24 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 23 Jan 2007 17:24:13 +0000 (17:24 +0000)
src/jalview/gui/AlignFrame.java
src/jalview/gui/Desktop.java

index 1f2b37b..f813457 100755 (executable)
@@ -1156,6 +1156,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener
 
     try
     {
+      jalview.gui.Desktop.internalCopy = true;
       //Its really worth setting the clipboard contents
       //to empty before setting the large StringSelection!!
       Toolkit.getDefaultToolkit().getSystemClipboard()
index 0f77b9d..45a03fa 100755 (executable)
@@ -47,6 +47,7 @@ public class Desktop extends jalview.jbgui.GDesktop
     public static jalview.ws.Discoverer discoverer;
 
     public static Object [] jalviewClipboard;
+    public static boolean internalCopy = false;
 
     static int fileLoadingCount= 0;
 
@@ -251,7 +252,10 @@ public class Desktop extends jalview.jbgui.GDesktop
 
     public void lostOwnership(Clipboard clipboard, Transferable contents)
     {
-      Desktop.jalviewClipboard = null;
+      if (!internalCopy)
+        Desktop.jalviewClipboard = null;
+
+      internalCopy = false;
     }
 
     public void dragEnter(DropTargetDragEvent evt)