From d12575dda59477de09c74c4666e2f1d1fac63524 Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Mon, 24 Apr 2017 16:06:22 +0100 Subject: [PATCH] JAL-1648 House keeping --- src/jalview/gui/Finder.java | 2 +- src/jalview/io/cache/JvCacheableInputBox.java | 2 +- src/jalview/jbgui/GFinder.java | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/jalview/gui/Finder.java b/src/jalview/gui/Finder.java index 0f8bb5e..a314cef 100755 --- a/src/jalview/gui/Finder.java +++ b/src/jalview/gui/Finder.java @@ -248,7 +248,7 @@ public class Finder extends GFinder { createNewGroup.setEnabled(false); - String searchString = searchBox.getEditor().getItem().toString().trim(); + String searchString = searchBox.getUserInput().trim(); if (isInvalidSearchString(searchString)) { diff --git a/src/jalview/io/cache/JvCacheableInputBox.java b/src/jalview/io/cache/JvCacheableInputBox.java index 3475d4f..2cf1678 100644 --- a/src/jalview/io/cache/JvCacheableInputBox.java +++ b/src/jalview/io/cache/JvCacheableInputBox.java @@ -95,7 +95,7 @@ public class JvCacheableInputBox extends JComboBox @Override public void actionPerformed(ActionEvent e) { - System.out.println(">>>>> Clear cache items"); + // System.out.println(">>>>> Clear cache items"); setSelectedItem(""); appCache.deleteCacheItems(cacheKey); updateCache(); diff --git a/src/jalview/jbgui/GFinder.java b/src/jalview/jbgui/GFinder.java index 144c67d..ee8a81a 100755 --- a/src/jalview/jbgui/GFinder.java +++ b/src/jalview/jbgui/GFinder.java @@ -209,14 +209,14 @@ public class GFinder extends JPanel public void textfield_caretUpdate(CaretEvent e) { - if (searchBox.getEditor().getItem().toString().indexOf(">") > -1) + if (searchBox.getUserInput().indexOf(">") > -1) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { - String str = searchBox.getEditor().getItem().toString(); + String str = searchBox.getUserInput(); AlignmentI al = null; try { @@ -231,7 +231,6 @@ public class GFinder extends JPanel jalview.util.Comparison.GapChars, al.getSequenceAt(0) .getSequenceAsString()); - searchBox.setSelectedItem(str); } } }); -- 1.7.10.2