JAL-1527 opening a project saved with JMol should use JMol (disregard
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 11 Nov 2014 09:20:40 +0000 (09:20 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 11 Nov 2014 09:20:40 +0000 (09:20 +0000)
viewer preference).

src/jalview/gui/StructureViewer.java

index ccb3c18..ddcb214 100644 (file)
@@ -115,25 +115,24 @@ public class StructureViewer
     return viewStructures(getViewerType(), ap, pdb, sequenceIs);
   }
 
-  public JalviewStructureDisplayI createView(Viewer jmol, String[] pdbf,
+  public JalviewStructureDisplayI createView(Viewer viewer, String[] pdbf,
           String[] id, SequenceI[][] sq, AlignmentPanel alignPanel,
           boolean useinJmolsuperpos, boolean usetoColourbyseq,
           boolean jmolColouring, String fileloc, Rectangle rect, String vid)
   {
     JalviewStructureDisplayI sview = null;
-    switch (getViewerType())
+    switch (viewer)
     {
     case JMOL:
-
       sview = new AppJmol(pdbf, id, sq, alignPanel, useinJmolsuperpos,
               usetoColourbyseq, jmolColouring, fileloc, rect, vid);
-
       break;
     case CHIMERA:
+      Cache.log.error("Unsupported structure viewer type "
+              + viewer.toString());
       break;
     default:
-      Cache.log.error("Unknown structure viewer type "
-              + getViewerType().toString());
+      Cache.log.error("Unknown structure viewer type " + viewer.toString());
     }
     return sview;
   }