From: Ben Soares Date: Fri, 15 Dec 2023 21:29:59 +0000 (+0000) Subject: JAL-4290 Add method to allow for specific settings. Revert setting show annotations. X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=89f6194d4bba6f8c9efa916e02e6fba2130c5e0f JAL-4290 Add method to allow for specific settings. Revert setting show annotations. --- diff --git a/src/jalview/bin/Commands.java b/src/jalview/bin/Commands.java index ece573d..5f723c1 100644 --- a/src/jalview/bin/Commands.java +++ b/src/jalview/bin/Commands.java @@ -908,7 +908,8 @@ public class Commands boolean showSSAnnotations, boolean showAnnotations, boolean hideTFrows) { - af.setAnnotationsVisibility(true, showSSAnnotations, showAnnotations); + af.setAnnotationsVisibility(showSSAnnotations, true, false); + af.setAnnotationsVisibility(showAnnotations, false, true); // show temperature factor annotations? if (hideTFrows) diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index 5865b7f..9a9e2a2 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -1670,15 +1670,24 @@ public class StructureSelectionManager public static void doConfigureStructurePrefs( StructureSelectionManager ssm) { - if (Cache.getDefault(Preferences.ADD_SS_ANN, true)) + doConfigureStructurePrefs(ssm, + Cache.getDefault(Preferences.ADD_SS_ANN, true), + Cache.getDefault(Preferences.ADD_TEMPFACT_ANN, true), + Cache.getDefault(Preferences.STRUCT_FROM_PDB, true), + Cache.getDefault(Preferences.USE_RNAVIEW, false)); + } + + public static void doConfigureStructurePrefs( + StructureSelectionManager ssm, boolean add_ss_ann, + boolean add_tempfact_ann, boolean struct_from_pdb, + boolean use_rnaview) + { + if (add_ss_ann) { - ssm.setAddTempFacAnnot( - Cache.getDefault(Preferences.ADD_TEMPFACT_ANN, true)); - ssm.setProcessSecondaryStructure( - Cache.getDefault(Preferences.STRUCT_FROM_PDB, true)); + ssm.setAddTempFacAnnot(add_tempfact_ann); + ssm.setProcessSecondaryStructure(struct_from_pdb); // JAL-3915 - RNAView is no longer an option so this has no effect - ssm.setSecStructServices( - Cache.getDefault(Preferences.USE_RNAVIEW, false)); + ssm.setSecStructServices(use_rnaview); } else {