/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
- * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
+ * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
searchString = searchString.toUpperCase();
}
regex = new com.stevesoft.pat.Regex(searchString);
+ regex.setIgnoreCase(!caseSensitive);
searchResults = new SearchResults();
idMatch = new Vector();
Sequence seq;
{
seq = (Sequence) alignment.getSequenceAt(seqIndex);
- if ((selection != null)
+ if ((selection != null && selection.getSize()>0)
&& !selection.getSequences(null).contains(seq))
{
seqIndex++;
}
item = seq.getSequenceAsString();
- if (!caseSensitive)
- item = item.toUpperCase();
if ((selection != null)
&& (selection.getEndRes() < alignment.getWidth() - 1))
{
resIndex = regex.matchedFrom();
- if ((selection != null)
+ if ((selection != null && selection.getSize()>0)
&& ((resIndex + Integer.parseInt(spaces.elementAt(
resIndex).toString())) < selection.getStartRes()))
{