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
JAL-353 updated patch for undo successive remove redundant sequences
[jalview.git]
/
src
/
jalview
/
commands
/
EditCommand.java
diff --git
a/src/jalview/commands/EditCommand.java
b/src/jalview/commands/EditCommand.java
index
da2b552
..
b39d1dd
100644
(file)
--- a/
src/jalview/commands/EditCommand.java
+++ b/
src/jalview/commands/EditCommand.java
@@
-20,9
+20,15
@@
*/
package jalview.commands;
*/
package jalview.commands;
-import java.util.*;
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.Annotation;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceFeature;
+import jalview.datamodel.SequenceI;
-import jalview.datamodel.*;
+import java.util.Hashtable;
+import java.util.List;
/**
*
/**
*
@@
-353,6
+359,8
@@
public class EditCommand implements CommandI
List<SequenceI> sequences;
synchronized (sequences = command.al.getSequences())
{
List<SequenceI> sequences;
synchronized (sequences = command.al.getSequences())
{
+ // int index = command.al.findIndex(command.seqs[i]);
+ // sequences.add(index, command.seqs[i]);
sequences.add(command.alIndex[i] < 0 ? 0 : command.alIndex[i], command.seqs[i]);
}
}
sequences.add(command.alIndex[i] < 0 ? 0 : command.alIndex[i], command.seqs[i]);
}
}
@@
-396,9
+404,13
@@
public class EditCommand implements CommandI
+ command.number);
}
if (command.seqs[i].getStart() == start)
+ command.number);
}
if (command.seqs[i].getStart() == start)
+ {
newstart--;
newstart--;
+ }
else
else
+ {
newend++;
newend++;
+ }
}
}
command.string[i] = null;
}
}
command.string[i] = null;
@@
-702,10
+714,12
@@
public class EditCommand implements CommandI
{
temp = new Annotation[aSize + command.number];
if (annotations[a].padGaps)
{
temp = new Annotation[aSize + command.number];
if (annotations[a].padGaps)
+ {
for (int aa = 0; aa < temp.length; aa++)
{
temp[aa] = new Annotation(command.gapChar + "", null, ' ', 0);
}
for (int aa = 0; aa < temp.length; aa++)
{
temp[aa] = new Annotation(command.gapChar + "", null, ' ', 0);
}
+ }
}
else
{
}
else
{
@@
-784,8
+798,10
@@
public class EditCommand implements CommandI
int copylen = Math.min(command.position,
annotations[a].annotations.length);
if (copylen > 0)
int copylen = Math.min(command.position,
annotations[a].annotations.length);
if (copylen > 0)
+ {
System.arraycopy(annotations[a].annotations, 0, temp, 0,
copylen); // command.position);
System.arraycopy(annotations[a].annotations, 0, temp, 0,
copylen); // command.position);
+ }
Annotation[] deleted = new Annotation[command.number];
if (copylen >= command.position)
Annotation[] deleted = new Annotation[command.number];
if (copylen >= command.position)