JAL-3518 separation of ChimeraXManager, pull up of closeViewer etc
[jalview.git] / src / jalview / ext / pymol / PymolCommands.java
index 7e5ba2d..be01533 100644 (file)
@@ -22,6 +22,8 @@ import jalview.structure.StructureCommandsBase;
  */
 public class PymolCommands extends StructureCommandsBase
 {
+  private static final StructureCommand CLOSE_PYMOL = new StructureCommand("quit");
+
   private static final StructureCommand COLOUR_BY_CHAIN = new StructureCommand("spectrum", "chain");
 
   private static final List<StructureCommandI> COLOR_BY_CHARGE = new ArrayList<>();
@@ -321,7 +323,7 @@ public class PymolCommands extends StructureCommandsBase
   public StructureCommandI closeViewer()
   {
     // https://pymolwiki.org/index.php/Quit
-    return new StructureCommand("quit");
+    return CLOSE_PYMOL;
   }
 
 }