X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fstructures%2Fmodels%2FAAStructureBindingModel.java;fp=src%2Fjalview%2Fstructures%2Fmodels%2FAAStructureBindingModel.java;h=e7f879ca07fd08fcbe8b75bd731e8453235b0efe;hb=990c7b35fef576a3b2ae28dcf86cf775630bd455;hp=e7aac1ccc7bbb937bd41f5e57cd7cdddf3c4c743;hpb=ae502ace910e7b00b5f47501c3ccfc6d19848dd2;p=jalview.git diff --git a/src/jalview/structures/models/AAStructureBindingModel.java b/src/jalview/structures/models/AAStructureBindingModel.java index e7aac1c..e7f879c 100644 --- a/src/jalview/structures/models/AAStructureBindingModel.java +++ b/src/jalview/structures/models/AAStructureBindingModel.java @@ -929,9 +929,11 @@ public abstract class AAStructureBindingModel /* * Show all as backbone before doing superposition(s) * (residues used for matching will be shown as ribbon) + * while remembering to hide any chains unselected for display */ // todo better way to ensure synchronous than setting getReply true!! executeCommands(commandGenerator.showBackbone(), true, null); + hideHiddenChains(); /* * superpose each (other) structure to the reference in turn @@ -1300,10 +1302,21 @@ public abstract class AAStructureBindingModel StructureCommandI cmd = getCommandGenerator().showStructures(model); executeCommand(cmd, false); - /* - * and hide any chains selected _not_ to be shown - * (whether mapped to sequence in the alignment or not) - */ + hideHiddenChains(); + + if (refocus) + { + focusView(); + } + } + + /** + * Hides any chains selected _not_ to be shown + * (whether mapped to sequence in the alignment or not) + */ + protected void hideHiddenChains() + { + StructureCommandI cmd; for (String pdbChain : chainsToHide) { String modelNo = getModelIdForFile(getFileForChain(pdbChain)); @@ -1314,11 +1327,6 @@ public abstract class AAStructureBindingModel executeCommand(cmd, false); } } - - if (refocus) - { - focusView(); - } } /**