From 6b2f5111b04caf7ee23fad5312187b1783c26b7d Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Sun, 23 Jun 2013 19:03:53 +0100 Subject: [PATCH] JAL-1230 proxy method for synchronising internal AlignmentI state in response to changes in alignment annotation --- src/jalview/datamodel/Alignment.java | 10 +++++++++- src/jalview/datamodel/AlignmentI.java | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/jalview/datamodel/Alignment.java b/src/jalview/datamodel/Alignment.java index 1553710..7b545c4 100755 --- a/src/jalview/datamodel/Alignment.java +++ b/src/jalview/datamodel/Alignment.java @@ -1479,5 +1479,13 @@ public class Alignment implements AlignmentI } } - + @Override + public void validateAnnotation(AlignmentAnnotation alignmentAnnotation) + { + alignmentAnnotation.validateRangeAndDisplay(); + if (isNucleotide() && alignmentAnnotation.isValidStruc()) + { + hasRNAStructure = true; + } + } } diff --git a/src/jalview/datamodel/AlignmentI.java b/src/jalview/datamodel/AlignmentI.java index 06026ef..64dcabb 100755 --- a/src/jalview/datamodel/AlignmentI.java +++ b/src/jalview/datamodel/AlignmentI.java @@ -469,4 +469,10 @@ public interface AlignmentI extends AnnotatedCollectionI */ public void moveSelectedSequencesByOne(SequenceGroup sg, Map map, boolean up); + + /** + * validate annotation after an edit and update any alignment state flags accordingly + * @param alignmentAnnotation + */ + public void validateAnnotation(AlignmentAnnotation alignmentAnnotation); } -- 1.7.10.2