git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b46771
)
JAL-1563 Added fix to prevent swing timer from reinitiating search action when jalvie...
author
tcofoegbu
<tcnofoegbu@dundee.ac.uk>
Wed, 27 Apr 2016 15:36:20 +0000
(16:36 +0100)
committer
tcofoegbu
<tcnofoegbu@dundee.ac.uk>
Wed, 27 Apr 2016 15:36:20 +0000
(16:36 +0100)
src/jalview/fts/core/GFTSPanel.java
patch
|
blob
|
history
diff --git
a/src/jalview/fts/core/GFTSPanel.java
b/src/jalview/fts/core/GFTSPanel.java
index
cae271d
..
0b23503
100644
(file)
--- a/
src/jalview/fts/core/GFTSPanel.java
+++ b/
src/jalview/fts/core/GFTSPanel.java
@@
-96,6
+96,8
@@
public abstract class GFTSPanel extends JPanel implements GFTSPanelI
protected Collection<FTSDataColumnI> wantedFields;
+ private String lastSearchTerm = "";
+
private JTable tbl_summary = new JTable()
{
@Override
@@
-364,7
+366,11
@@
public abstract class GFTSPanel extends JPanel implements GFTSPanelI
@Override
public void actionPerformed(ActionEvent e)
{
- searchAction();
+ if (!getTypedText().equalsIgnoreCase(lastSearchTerm))
+ {
+ searchAction();
+ lastSearchTerm = getTypedText();
+ }
}
}, false);
txt_search.getDocument().addDocumentListener(listener);