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
Fixed bug in trim right annotation adjust
[jalview.git]
/
src
/
jalview
/
commands
/
EditCommand.java
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