JAL-1459 ensure we notify the drop handler that we've dealt with the
[jalview.git] / src / jalview / gui / Desktop.java
index f4d1885..fe99469 100644 (file)
@@ -806,6 +806,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;
@@ -854,6 +855,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
       }
     } catch (Exception e)
     {
+      success=false;
     }
 
     if (files != null)
@@ -882,8 +884,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 
   }
 
   /**