JAL-1641 round trip test/refactoring
[jalview.git] / src / jalview / io / AppletFormatAdapter.java
index b235bcc..90400f4 100755 (executable)
@@ -26,7 +26,6 @@ import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.AlignmentView;
-import jalview.gui.AlignmentPanel;
 import jalview.util.MessageManager;
 
 import java.io.File;
@@ -146,7 +145,7 @@ public class AppletFormatAdapter
     this.viewpanel = viewpanel;
   }
 
-  public AppletFormatAdapter(AlignmentPanel alignPanel,
+  public AppletFormatAdapter(AlignmentViewPanel alignPanel,
           AlignExportSettingI settings)
   {
     viewpanel = alignPanel;
@@ -484,7 +483,7 @@ public class AppletFormatAdapter
   private AlignmentI buildAlignmentFrom(AlignFile alignFile2)
   {
     // Standard boilerplate for creating alignment from parser
-    alignFile.configureForView(viewpanel);
+    // alignFile.configureForView(viewpanel);
 
     AlignmentI al = new Alignment(alignFile.getSeqsAsArray());
 
@@ -520,7 +519,7 @@ public class AppletFormatAdapter
         aselview.addAnnotation(aa);
       }
     }
-
+    viewpanel = ap;
     return formatSequences(format, aselview, jvsuffix);
   }
 
@@ -598,11 +597,10 @@ public class AppletFormatAdapter
       {
         throw new Exception(MessageManager.getString("error.implementation_error_unknown_file_format_string"));
       }
+
       afile.setNewlineString(newline);
       afile.addJVSuffix(jvsuffix);
-
       afile.setExportSettings(exportSettings);
-
       afile.configureForView(viewpanel);
 
       // check whether we were given a specific alignment to export, rather than