From: Jim Procter Date: Tue, 9 Oct 2018 12:23:25 +0000 (+0100) Subject: JAL-3127 TODO - resolve reference to Viewport for group colour schemes instantiated... X-Git-Tag: Release_2_11_0~17^2~46^2~18 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1071f76c49d1e3278948651638b18e11298e6766;p=jalview.git JAL-3127 TODO - resolve reference to Viewport for group colour schemes instantiated before the viewport has been created. --- diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index 0c31a2a..133c186 100644 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -52,7 +52,6 @@ import jalview.schemabinding.version2.Annotation; import jalview.schemabinding.version2.AnnotationColours; import jalview.schemabinding.version2.AnnotationElement; import jalview.schemabinding.version2.CalcIdParam; -import jalview.schemabinding.version2.Colour; import jalview.schemabinding.version2.CompoundMatcher; import jalview.schemabinding.version2.DBRef; import jalview.schemabinding.version2.Features; @@ -3424,7 +3423,8 @@ public class Jalview2XML } else { - cs = ColourSchemeProperty.getColourScheme(al, + // TODO: notify of view reference when available + cs = ColourSchemeProperty.getColourScheme(null, al, jGroup.getColour()); } } diff --git a/src/jalview/gui/Jalview2XML_V1.java b/src/jalview/gui/Jalview2XML_V1.java index eb494e3..aef69e7 100755 --- a/src/jalview/gui/Jalview2XML_V1.java +++ b/src/jalview/gui/Jalview2XML_V1.java @@ -335,7 +335,8 @@ public class Jalview2XML_V1 } else { - cs = ColourSchemeProperty.getColourScheme(al, + // TODO: update colourscheme with view reference + cs = ColourSchemeProperty.getColourScheme(null, al, groups[i].getColour()); } } diff --git a/src/jalview/io/AnnotationFile.java b/src/jalview/io/AnnotationFile.java index e578a45..dd385d2 100755 --- a/src/jalview/io/AnnotationFile.java +++ b/src/jalview/io/AnnotationFile.java @@ -1617,8 +1617,10 @@ public class AnnotationFile } else if (key.equalsIgnoreCase("colour")) { + // TODO need to notify colourscheme of view reference once it is + // available sg.cs.setColourScheme( - ColourSchemeProperty.getColourScheme(al, value)); + ColourSchemeProperty.getColourScheme(null, al, value)); } else if (key.equalsIgnoreCase("pidThreshold")) {