Merge branch 'r281_JAL-1211' into Release_2_8_1_Branch
[jalview.git] / src / jalview / gui / Desktop.java
index fc6d6f9..d54c887 100644 (file)
@@ -807,6 +807,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
    */
   public void drop(DropTargetDropEvent evt)
   {
+    boolean success=true;
     Transferable t = evt.getTransferable();
     java.util.List files = null;
     java.util.List protocols = null;
@@ -855,6 +856,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
       }
     } catch (Exception e)
     {
+      success=false;
     }
 
     if (files != null)
@@ -883,8 +885,10 @@ public class Desktop extends jalview.jbgui.GDesktop implements
         }
       } catch (Exception ex)
       {
+        success=false;
       }
     }
+    evt.dropComplete(success); // need this to ensure input focus is properly transfered to any new windows created 
   }
 
   /**