From: kiramt Date: Mon, 17 Oct 2016 13:36:16 +0000 (+0100) Subject: acceptDrop call added before getTransferable in alignment frame drag and X-Git-Tag: Release_2_10_0b1~3^2~12^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fbug%2FJAL-1552dragndroptake2;p=jalview.git acceptDrop call added before getTransferable in alignment frame drag and drop. --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 672f7ac..63620e5 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -108,6 +108,7 @@ import java.awt.datatransfer.Clipboard; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.StringSelection; import java.awt.datatransfer.Transferable; +import java.awt.dnd.DnDConstants; import java.awt.dnd.DropTargetDragEvent; import java.awt.dnd.DropTargetDropEvent; import java.awt.dnd.DropTargetEvent; @@ -4814,6 +4815,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, @Override public void drop(DropTargetDropEvent evt) { + // 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 files = new ArrayList(), protocols = new ArrayList();