git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove b keystroke
[jalview.git]
/
src
/
jalview
/
appletgui
/
ColumnSelection.java
diff --git
a/src/jalview/appletgui/ColumnSelection.java
b/src/jalview/appletgui/ColumnSelection.java
index
72bec07
..
33c4604
100755
(executable)
--- a/
src/jalview/appletgui/ColumnSelection.java
+++ b/
src/jalview/appletgui/ColumnSelection.java
@@
-30,7
+30,8
@@
public class ColumnSelection
\r
public void addElement(int col)
\r
{
\r
\r
public void addElement(int col)
\r
{
\r
- selected.addElement(new Integer(col));
\r
+ if(!selected.contains(new Integer(col)))
\r
+ selected.addElement(new Integer(col));
\r
}
\r
\r
public void clear()
\r
}
\r
\r
public void clear()
\r
@@
-45,12
+46,20
@@
public class ColumnSelection
{
\r
selected.removeElement(colInt);
\r
}
\r
{
\r
selected.removeElement(colInt);
\r
}
\r
- else
\r
+ }
\r
+
\r
+ public void removeElements(int start, int end)
\r
+ {
\r
+ Integer colInt;
\r
+ for(int i=start; i<end; i++)
\r
{
\r
{
\r
- System.err.println(
\r
- "WARNING: Tried to remove Integer NOT in ColumnSelection");
\r
+ colInt = new Integer(i);
\r
+ if (selected.contains(colInt))
\r
+ {
\r
+ selected.removeElement(colInt);
\r
+ }
\r
+ }
\r
}
\r
}
\r
- }
\r
\r
public boolean contains(int col)
\r
{
\r
\r
public boolean contains(int col)
\r
{
\r