X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignFrame.java;h=ccf7303f35160d152b5f9854d58296cc4b07c7fb;hb=b2319fcc38be5c500ed7cafc014cf9da96a4ce98;hp=b2c890160329bac9f5ed309d03b5e8a4ea0d904d;hpb=0ad0cc7fe1de5c299363b0dc9b4b032d5d199275;p=jalview.git diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index b2c8901..ccf7303 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -263,7 +263,7 @@ public class AlignFrame java.io.File.separatorChar) + 1); } - Jalview2XML.SaveAlignment(this, file, shortName); + new Jalview2XML().SaveAlignment(this, file, shortName); // USE Jalview2XML to save this file return true; @@ -912,6 +912,11 @@ public class AlignFrame */ public void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e) { + if(viewport.cursorMode) + { + alignPanel.seqPanel.keyboardNo1 = null; + alignPanel.seqPanel.keyboardNo2 = null; + } viewport.setSelectionGroup(null); viewport.getColumnSelection().clear(); viewport.setSelectionGroup(null); @@ -1134,7 +1139,10 @@ public class AlignFrame public void alignmentChanged() { - if(viewport.vconsensus!=null) + if(viewport.padGaps) + viewport.getAlignment().padGaps(); + + if(viewport.vconsensus!=null && viewport.autoCalculateConsensus) { viewport.updateConsensus(); viewport.updateConservation(); @@ -1196,8 +1204,11 @@ public class AlignFrame { addHistoryItem(new HistoryItem("Pad Gaps", viewport.alignment, HistoryItem.HIDE)); - if (viewport.getAlignment().padGaps()) - alignmentChanged(); + + viewport.padGaps = padGapsMenuitem.isSelected(); + + // if (viewport.padGaps) + alignmentChanged(); } /** @@ -1928,6 +1939,13 @@ public class AlignFrame new PCAPanel(viewport); } + + public void autoCalculate_actionPerformed(ActionEvent e) + { + viewport.autoCalculateConsensus = autoCalculate.isSelected(); + } + + /** * DOCUMENT ME! * @@ -1977,7 +1995,7 @@ public class AlignFrame */ void NewTreePanel(String type, String pwType, String title) { - final TreePanel tp; + TreePanel tp; if ( (viewport.getSelectionGroup() != null) && (viewport.getSelectionGroup().getSize() > 3)) @@ -2029,7 +2047,6 @@ public class AlignFrame } addTreeMenuItem(tp, title); - viewport.setCurrentTree(tp.getTree()); Desktop.addInternalFrame(tp, title + " from " + this.title, 600, 500); } @@ -2725,10 +2742,10 @@ public void drop(DropTargetDropEvent evt) } // This method will attempt to load a "dropped" file first by testing - // whether its and Annotation file, then group file. If both are + // whether its and Annotation file, then features file. If both are // false then the user may have dropped an alignment file onto this // AlignFrame - void loadJalviewDataFile(String file) + public void loadJalviewDataFile(String file) { try{ boolean isAnnotation = new AnnotationReader().readAnnotationFile(viewport.