From 678a8ac35bb269d80cda081bec11e7b403c9811a Mon Sep 17 00:00:00 2001 From: kiramt Date: Mon, 17 Oct 2016 14:36:16 +0100 Subject: [PATCH] acceptDrop call added before getTransferable in alignment frame drag and drop. --- src/jalview/gui/AlignFrame.java | 4 ++++ 1 file changed, 4 insertions(+) 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(); -- 1.7.10.2