From: amwaterhouse Date: Tue, 3 May 2005 12:49:40 +0000 (+0000) Subject: formatAdapter.formatSequences and maintain annotation after undo X-Git-Tag: Release_2_0~333 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=841a05c13cd03fbfe9ef52c907fcdc2d32f9a737;p=jalview.git formatAdapter.formatSequences and maintain annotation after undo --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index cabb24f..4fbdb72 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -94,7 +94,7 @@ public class AlignFrame extends GAlignFrame { String choice = chooser.getSelectedFile().getPath(); jalview.bin.Cache.setProperty("LAST_DIRECTORY", choice); - String output = FormatAdapter.get(e.getActionCommand(), viewport.getAlignment().getSequences()); + String output = FormatAdapter.formatSequences(e.getActionCommand(), viewport.getAlignment().getSequences()); try{ java.io.PrintWriter out = new java.io.PrintWriter( new java.io.FileWriter( choice ) ); out.println(output); @@ -112,7 +112,7 @@ public class AlignFrame extends GAlignFrame cap.formatForOutput(); frame.setContentPane(cap); Desktop.addInternalFrame(frame, "Alignment output - "+e.getActionCommand(), 600, 500); - cap.setText( FormatAdapter.get(e.getActionCommand(), viewport.getAlignment().getSequences())); + cap.setText( FormatAdapter.formatSequences(e.getActionCommand(), viewport.getAlignment().getSequences())); } protected void htmlMenuItem_actionPerformed(ActionEvent e) @@ -232,9 +232,13 @@ public class AlignFrame extends GAlignFrame redoList.add(0, new Object[] {history[0], seq}); seq = (SequenceI[]) history[1]; + AlignmentAnnotation [] old = viewport.alignment.getAlignmentAnnotation(); viewport.setAlignment( new Alignment(seq) ); updateEditMenuBar(); + for(int i=0; i