JAL-1552 added acceptDrop call before getTransferable to avoid error bug/JAL-1552dragndropurl
authorkiramt <k.mourao@dundee.ac.uk>
Tue, 11 Oct 2016 11:01:23 +0000 (12:01 +0100)
committerkiramt <k.mourao@dundee.ac.uk>
Tue, 11 Oct 2016 11:01:23 +0000 (12:01 +0100)
with Java native dnd

src/jalview/gui/Desktop.java

index f99af34..1d76f27 100644 (file)
@@ -941,6 +941,9 @@ public class Desktop extends jalview.jbgui.GDesktop implements
   public void drop(DropTargetDropEvent evt)
   {
     boolean success = true;
+    // JAL-1552 - acceptDrop required before getTransferable call for
+    // Java's Transferable for native dnd
+    evt.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE);
     Transferable t = evt.getTransferable();
     java.util.List<String> files = new ArrayList<String>();
     java.util.List<String> protocols = new ArrayList<String>();