From 254e3170f750a050d567158a94b26f7cb10d68c8 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 13 May 2024 11:23:23 +0100 Subject: [PATCH] JAL-4410 better logic for maximal mapped chains (I seem to remember coding this before...) --- src/jalview/structure/StructureSelectionManager.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index a8ee9fe..c9719b5 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -591,10 +591,15 @@ public class StructureSelectionManager } else { - if (as.maxscore >= max) + if (as.maxscore > max) { - maxChain.add(chain); max = as.maxscore; + maxChain.clear(); + maxAlignSeqs.clear(); + } + if (as.maxscore == max) + { + maxChain.add(chain); maxAlignSeqs.add(as); } } -- 1.7.10.2