JAL-4265 Change to use JmolCommands
[jalview.git] / src / jalview / gui / AppJmol.java
index 5b935b7..ba4eb9c 100644 (file)
@@ -434,7 +434,7 @@ public class AppJmol extends StructureViewerBase
     try
     {
       makePDBImage(null, type, null,
-              BitmapImageSizing.defaultBitmapImageSizing(), null);
+              BitmapImageSizing.defaultBitmapImageSizing());
     } catch (ImageOutputException ioex)
     {
       Console.error("Unexpected error whilst writing " + type.toString(),
@@ -443,8 +443,7 @@ public class AppJmol extends StructureViewerBase
   }
 
   public void makePDBImage(File file, ImageMaker.TYPE type, String renderer,
-          BitmapImageSizing userBis, List<String> extraCommands)
-          throws ImageOutputException
+          BitmapImageSizing userBis) throws ImageOutputException
   {
     int width = getWidth();
     int height = getHeight();
@@ -473,24 +472,8 @@ public class AppJmol extends StructureViewerBase
           }
         }
 
-        String saveStateNameTemp = "JalviewSaveStateTemp";
-        jmb.executeCommand(
-                new StructureCommand("save STATE " + saveStateNameTemp),
-                false);
-
-        if (extraCommands != null)
-        {
-          for (String cmd : extraCommands)
-          {
-            jmb.executeCommand(new StructureCommand(cmd), false);
-          }
-        }
-
         jmb.jmolViewer.requestRepaintAndWait("image export");
         jmb.jmolViewer.renderScreenImage(ig2, usewidth, useheight);
-        jmb.executeCommand(
-                new StructureCommand("restore STATE " + saveStateNameTemp),
-                false);
       }
     };
     String view = MessageManager.getString("action.view")