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:
860000c
)
Annotations do not extend when full alignment is adjusted
author
amwaterhouse
<Andrew Waterhouse>
Fri, 4 May 2007 10:31:18 +0000
(10:31 +0000)
committer
amwaterhouse
<Andrew Waterhouse>
Fri, 4 May 2007 10:31:18 +0000
(10:31 +0000)
src/jalview/commands/EditCommand.java
patch
|
blob
|
history
diff --git
a/src/jalview/commands/EditCommand.java
b/src/jalview/commands/EditCommand.java
index
aece057
..
61e2595
100644
(file)
--- a/
src/jalview/commands/EditCommand.java
+++ b/
src/jalview/commands/EditCommand.java
@@
-112,7
+112,7
@@
public class EditCommand
/**
* append a new editCommand
* Note. this shouldn't be called if the edit is an operation affects more alignment objects than the one referenced
/**
* append a new editCommand
* Note. this shouldn't be called if the edit is an operation affects more alignment objects than the one referenced
- * in al (for example, cut or pasting whole sequences). Use the form with an additional AlignmentI[] views parameter.
+ * in al (for example, cut or pasting whole sequences). Use the form with an additional AlignmentI[] views parameter.
* @param command
* @param seqs
* @param position
* @param command
* @param seqs
* @param position
@@
-232,6
+232,7
@@
public class EditCommand
final void insertGap(Edit command)
{
final void insertGap(Edit command)
{
+
for (int s = 0; s < command.seqs.length; s++)
{
command.seqs[s].insertCharAt(command.position,
for (int s = 0; s < command.seqs.length; s++)
{
command.seqs[s].insertCharAt(command.position,
@@
-403,7
+404,6
@@
public class EditCommand
final void adjustAnnotations(Edit command, boolean insert, boolean modifyVisibility, AlignmentI[] views)
{
final void adjustAnnotations(Edit command, boolean insert, boolean modifyVisibility, AlignmentI[] views)
{
-
AlignmentAnnotation[] annotations = null;
if (modifyVisibility && !insert)
AlignmentAnnotation[] annotations = null;
if (modifyVisibility && !insert)
@@
-440,7
+440,7
@@
public class EditCommand
}
command.seqs[s].setAlignmentAnnotation(null);
if (alen!=tmp.length)
}
command.seqs[s].setAlignmentAnnotation(null);
if (alen!=tmp.length)
- {
+ {
// save the non-null annotation references only
AlignmentAnnotation[] saved = new AlignmentAnnotation[alen];
for (int aa=0,aapos=0;aa<tmp.length;aa++)
// save the non-null annotation references only
AlignmentAnnotation[] saved = new AlignmentAnnotation[alen];
for (int aa=0,aapos=0;aa<tmp.length;aa++)
@@
-557,17
+557,13
@@
public class EditCommand
Annotation[] temp;
for (int a = 0; a < annotations.length; a++)
{
Annotation[] temp;
for (int a = 0; a < annotations.length; a++)
{
- if (annotations[a].autoCalculated)
+ if (annotations[a].autoCalculated || annotations[a].annotations == null)
{
continue;
}
int tSize = 0;
{
continue;
}
int tSize = 0;
- if (annotations[a].annotations == null)
- {
- // nothing to edit here ?
- continue;
- }
+
aSize = annotations[a].annotations.length;
if (insert)
{
aSize = annotations[a].annotations.length;
if (insert)
{
@@
-584,13
+580,13
@@
public class EditCommand
{
if (command.position < aSize)
{
{
if (command.position < aSize)
{
- if (command.position + command.number > aSize)
+ if (command.position + command.number >= aSize)
{
tSize = aSize;
}
else
{
{
tSize = aSize;
}
else
{
- tSize = aSize - command.number + command.position;
+ tSize = aSize - command.number;
}
}
else
}
}
else
@@
-603,9
+599,9
@@
public class EditCommand
tSize = aSize;
}
temp = new Annotation[tSize];
tSize = aSize;
}
temp = new Annotation[tSize];
-
}
}
+
if (insert)
{
if (command.position < annotations[a].annotations.length)
if (insert)
{
if (command.position < annotations[a].annotations.length)