JAL-1552 fix JAL-2122 resolve File->string before adding to List<String>.
authorJim Procter <jprocter@issues.jalview.org>
Mon, 30 May 2016 11:02:44 +0000 (12:02 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Mon, 30 May 2016 11:02:44 +0000 (12:02 +0100)
src/jalview/gui/Desktop.java

index 94f2e82..698b164 100644 (file)
@@ -3164,8 +3164,12 @@ public class Desktop extends jalview.jbgui.GDesktop implements
       // Works on Windows and MacOSX
       Cache.log.debug("Drop handled as javaFileListFlavor");
       evt.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE);
-      files.addAll((java.util.List<String>) t
-              .getTransferData(DataFlavor.javaFileListFlavor));
+      for (Object file : (List) t
+              .getTransferData(DataFlavor.javaFileListFlavor))
+      {
+        files.add(((File)file).toString());
+        protocols.add(FormatAdapter.FILE);
+      }
     }
     else
     {