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 (from parent 1:
1b1a100
)
Fixed bug in trim right annotation adjust
author
amwaterhouse
<Andrew Waterhouse>
Mon, 5 Feb 2007 11:46:11 +0000
(11:46 +0000)
committer
amwaterhouse
<Andrew Waterhouse>
Mon, 5 Feb 2007 11:46:11 +0000
(11:46 +0000)
src/jalview/commands/EditCommand.java
patch
|
blob
|
history
diff --git
a/src/jalview/commands/EditCommand.java
b/src/jalview/commands/EditCommand.java
index
1f60569
..
7effdfb
100644
(file)
--- a/
src/jalview/commands/EditCommand.java
+++ b/
src/jalview/commands/EditCommand.java
@@
-372,7
+372,12
@@
public class EditCommand implements CommandI
else
\r
{
\r
if(command.position<aSize)
\r
else
\r
{
\r
if(command.position<aSize)
\r
- temp = new Annotation[aSize - command.number + command.position];
\r
+ {
\r
+ if (aSize - command.number + command.position > 0)
\r
+ temp = new Annotation[aSize - command.number + command.position];
\r
+ else
\r
+ temp = new Annotation[aSize];
\r
+ }
\r
else
\r
temp = new Annotation[aSize];
\r
}
\r
else
\r
temp = new Annotation[aSize];
\r
}
\r
@@
-409,7
+414,7
@@
public class EditCommand implements CommandI
}
\r
else
\r
{
\r
}
\r
else
\r
{
\r
- if(command.position < aSize)
\r
+ if(command.position < aSize && aSize - command.number+command.position>0)
\r
{
\r
System.arraycopy(annotations[a].annotations,
\r
0, temp, 0, command.position);
\r
{
\r
System.arraycopy(annotations[a].annotations,
\r
0, temp, 0, command.position);
\r