house keeping
[jalview.git] / src / jalview / gui / SequenceFetcher.java
index fb94c05..2f4ace3 100755 (executable)
@@ -115,7 +115,7 @@ public class SequenceFetcher extends JPanel implements Runnable
 
   private static Thread initingThread = null;
 
-  int x = 0;
+  int debounceTrap = 0;
   /**
    * Blocking method that initialises and returns the shared instance of the
    * SequenceFetcher client
@@ -357,17 +357,16 @@ public class SequenceFetcher extends JPanel implements Runnable
       @Override
       public void actionPerformed(ActionEvent e)
       {
-        x++;
+        debounceTrap++;
         String currentSelection = database.getSelectedItem();
 
         if (!currentSelection.equalsIgnoreCase("pdb"))
         {
             otherSourceAction();
         }
-        if (currentSelection.equalsIgnoreCase("pdb") && ((x % 2) == 0))
+        if (currentSelection.equalsIgnoreCase("pdb") && ((debounceTrap % 2) == 0))
         {
-          frame.dispose();
-          new EBIFetchPanel();
+          pdbSourceAction();
         }
 
       }
@@ -388,10 +387,13 @@ public class SequenceFetcher extends JPanel implements Runnable
 
   }
 
-  private void hideX()
+  private void pdbSourceAction()
   {
-    this.setVisible(false);
+    databaseButt.setText(database.getSelectedItem());
+    new EBIFetchPanel(this);
+    frame.dispose();
   }
+
   private void otherSourceAction()
   {
     try