JAL-2468 change score model in PCAModel when switching
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 27 Mar 2017 13:25:59 +0000 (14:25 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 27 Mar 2017 13:25:59 +0000 (14:25 +0100)
peptide/nucleotide

src/jalview/appletgui/PCAPanel.java

index c832305..2d77c59 100644 (file)
@@ -216,6 +216,9 @@ public class PCAPanel extends EmbmenuFrame implements Runnable,
       if (!pcaModel.isNucleotide())
       {
         pcaModel.setNucleotide(true);
+        ScoreModelI scoreModel = ScoreModels.getInstance().getDefaultModel(
+                false);
+        pcaModel.setScoreModel(scoreModel);
         new Thread(this).start();
       }
     }
@@ -224,6 +227,9 @@ public class PCAPanel extends EmbmenuFrame implements Runnable,
       if (pcaModel.isNucleotide())
       {
         pcaModel.setNucleotide(false);
+        ScoreModelI scoreModel = ScoreModels.getInstance().getDefaultModel(
+                true);
+        pcaModel.setScoreModel(scoreModel);
         new Thread(this).start();
       }
     }