From 2eee0030a2515c168e1cadbe8fe248c71f7a556a Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 25 May 2016 18:51:05 +0100 Subject: [PATCH] JAL-1522 patch - try to pick best text dataflavor --- src/jalview/gui/AlignFrame.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 7e7bdd3..0419b6f 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -5048,6 +5048,12 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, // This is used by Unix drag system evt.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); String data = (String) t.getTransferData(uriListFlavor); + if (data == null) + { + // try 'best' dataflavor + data = (String) t.getTransferData(DataFlavor + .selectBestTextFlavor(t.getTransferDataFlavors())); + } files = new java.util.ArrayList(1); for (java.util.StringTokenizer st = new java.util.StringTokenizer( data, "\r\n"); st.hasMoreTokens();) -- 1.7.10.2