From 6ce5fc3e89e229a20027189745a80ef6df953c27 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Tue, 21 Mar 2017 09:44:08 +0000 Subject: [PATCH] JAL-2243 update discovered features on opening structure in Chimera --- src/jalview/gui/ChimeraViewFrame.java | 11 +++++++++++ src/jalview/structures/models/AAStructureBindingModel.java | 2 +- .../structures/models/AAStructureBindingModelTest.java | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/jalview/gui/ChimeraViewFrame.java b/src/jalview/gui/ChimeraViewFrame.java index fe4a000..ec9feb7 100644 --- a/src/jalview/gui/ChimeraViewFrame.java +++ b/src/jalview/gui/ChimeraViewFrame.java @@ -20,6 +20,7 @@ */ package jalview.gui; +import jalview.api.FeatureRenderer; import jalview.bin.Cache; import jalview.datamodel.AlignmentI; import jalview.datamodel.PDBEntry; @@ -613,6 +614,16 @@ public class ChimeraViewFrame extends StructureViewerBase jmb.setFinishedInit(true); jmb.setLoadingFromArchive(false); + /* + * ensure that any newly discovered features (e.g. RESNUM) + * are added to any open feature settings dialog + */ + FeatureRenderer fr = getBinding().getFeatureRenderer(null); + if (fr != null) + { + fr.featuresAdded(); + } + // refresh the sequence colours for the new structure(s) for (AlignmentPanel ap : _colourwith) { diff --git a/src/jalview/structures/models/AAStructureBindingModel.java b/src/jalview/structures/models/AAStructureBindingModel.java index 82ba2d7..84475fe 100644 --- a/src/jalview/structures/models/AAStructureBindingModel.java +++ b/src/jalview/structures/models/AAStructureBindingModel.java @@ -770,6 +770,6 @@ public abstract class AAStructureBindingModel extends return fileLoadingError != null && fileLoadingError.length() > 0; } - protected abstract jalview.api.FeatureRenderer getFeatureRenderer( + public abstract jalview.api.FeatureRenderer getFeatureRenderer( AlignmentViewPanel alignment); } diff --git a/test/jalview/structures/models/AAStructureBindingModelTest.java b/test/jalview/structures/models/AAStructureBindingModelTest.java index 30f9e68..7ba22b4 100644 --- a/test/jalview/structures/models/AAStructureBindingModelTest.java +++ b/test/jalview/structures/models/AAStructureBindingModelTest.java @@ -212,7 +212,7 @@ public class AAStructureBindingModelTest } @Override - protected FeatureRenderer getFeatureRenderer( + public FeatureRenderer getFeatureRenderer( AlignmentViewPanel alignment) { return null; -- 1.7.10.2