JAL-958 flag indicating if visualization settings for new group annotation should...
[jalview.git] / src / jalview / gui / AlignmentPanel.java
index 8f2dd04..bcdd620 100644 (file)
@@ -1394,11 +1394,14 @@ public class AlignmentPanel extends GAlignmentPanel implements
    */
   public void updateAnnotation()
   {
-    updateAnnotation(false);
+    updateAnnotation(false, false);
   }
-
   public void updateAnnotation(boolean applyGlobalSettings)
   {
+    updateAnnotation(applyGlobalSettings,false);
+  }
+  public void updateAnnotation(boolean applyGlobalSettings, boolean preserveNewGroupSettings)
+  {
     // TODO: this should be merged with other annotation update stuff - that
     // sits on AlignViewport
     boolean updateCalcs = false;
@@ -1434,7 +1437,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
       for (SequenceGroup sg:av.getAlignment().getGroups())
       {
         updateCalcs = false;
-        if (applyGlobalSettings || !oldrfs.containsKey(sg))
+        if (applyGlobalSettings || (!preserveNewGroupSettings && !oldrfs.containsKey(sg)))
         {
           // set defaults for this group's conservation/consensus
           sg.setshowSequenceLogo(showprf);