fix for JAL-1226
authorJim Procter <jprocter@compbio.dundee.ac.uk>
Wed, 26 Feb 2014 17:22:38 +0000 (17:22 +0000)
committerJim Procter <jprocter@compbio.dundee.ac.uk>
Wed, 26 Feb 2014 17:22:38 +0000 (17:22 +0000)
src/jalview/gui/Finder.java

index b1e9907..f53af3f 100755 (executable)
@@ -241,24 +241,26 @@ public class Finder extends GFinder
               null, JOptionPane.INFORMATION_MESSAGE);
       resIndex = -1;
       seqIndex = 0;
-    }
-
-    if (findAll)
-    {
-      String message = (idMatch.size() > 0) ? "" + idMatch.size() + " IDs"
-              : "";
-      if (searchResults != null)
+    } else {
+      if (findAll)
       {
-        if (idMatch.size() > 0 && searchResults.getSize() > 0)
+        // then we report the matches that were found
+        String message = (idMatch.size() > 0) ? "" + idMatch.size()
+                + " IDs" : "";
+        if (searchResults != null)
         {
-          message += " and ";
+          if (idMatch.size() > 0 && searchResults.getSize() > 0)
+          {
+            message += " and ";
+          }
+          message += searchResults.getSize()
+                  + " subsequence matches found.";
         }
-        message += searchResults.getSize() + " subsequence matches found.";
+        JOptionPane.showInternalMessageDialog(this, message, null,
+                JOptionPane.INFORMATION_MESSAGE);
+        resIndex = -1;
+        seqIndex = 0;
       }
-      JOptionPane.showInternalMessageDialog(this, message, null,
-              JOptionPane.INFORMATION_MESSAGE);
-      resIndex = -1;
-      seqIndex = 0;
     }
 
   }