JAL-3374 "noannotation" and menu sync
[jalview.git] / src / jalview / bin / Jalview.java
index 2cf6f37..bb2038e 100755 (executable)
@@ -739,12 +739,17 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi
             System.out.println("CMD [-sortbytree] executed successfully!");
           }
         }
+        
+        boolean doUpdateAnnotation = false;
+        
+
         if (aparser.contains(ArgsParser.NOANNOTATION)
                 || aparser.contains(ArgsParser.NOANNOTATION2))
         {
           af.getViewport().setShowAnnotation(false);
           if (!af.getViewport().isShowAnnotation())
           {
+            doUpdateAnnotation = true;
             System.out.println("CMD no-annotation executed successfully!");
           }
         }
@@ -753,10 +758,16 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi
           af.getViewport().setSortByTree(false);
           if (!af.getViewport().getSortByTree())
           {
+            doUpdateAnnotation = true;
             System.out
                     .println("CMD [-nosortbytree] executed successfully!");
           }
         }
+        if (doUpdateAnnotation)
+        { // BH 2019.07.24
+          af.setMenusForViewport();
+          af.alignPanel.updateLayout();
+        }
         data = aparser.getValue(ArgsParser.TREE, true);
         if (data != null)
         {