JAL-629 --close individually for each AlignFrame opened now allows batch processing...
[jalview.git] / src / jalview / bin / Commands.java
index b42f08e..001e32e 100644 (file)
@@ -77,6 +77,7 @@ public class Commands
     {
       for (String id : argParser.linkedIds())
       {
+        ArgValuesMap avm = argParser.linkedArgs(id);
         Commands cmds = new Commands();
         if (id == null)
         {
@@ -90,6 +91,17 @@ public class Commands
         }
         cmds.processImages(id);
         argsWereParsed &= cmds.wereParsed();
+
+        // close ap
+        if (avm.getBoolean(Arg.CLOSE))
+        {
+          AlignFrame af = cmds.afMap.get(id);
+          if (af != null)
+          {
+            af.closeMenuItem_actionPerformed(true);
+          }
+        }
+
       }
 
     }