From cb52962fdc914e4c1e7fac7afd83dbdf8defec22 Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 4 Jun 2010 16:09:48 +0000 Subject: [PATCH] update group annotation for new treegroups (JAL-552) --- src/jalview/gui/AlignmentPanel.java | 1 + src/jalview/gui/TreeCanvas.java | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index 09b7215..72290a7 100755 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -1328,6 +1328,7 @@ public class AlignmentPanel extends GAlignmentPanel implements public void updateAnnotation(boolean applyGlobalSettings) { + // TODO: this should be merged with other annotation update stuff - that sits on AlignViewport boolean updateCalcs = false; boolean conv = av.isShowGroupConservation(); boolean cons = av.isShowGroupConsensus(); diff --git a/src/jalview/gui/TreeCanvas.java b/src/jalview/gui/TreeCanvas.java index 028552c..c2b9b7f 100755 --- a/src/jalview/gui/TreeCanvas.java +++ b/src/jalview/gui/TreeCanvas.java @@ -864,6 +864,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, void colourGroups() { + AlignmentPanel[] aps = getAssociatedPanels(); for (int i = 0; i < tree.getGroups().size(); i++) { Color col = new Color((int) (Math.random() * 255), (int) (Math @@ -912,7 +913,6 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, sg.setName("JTreeGroup:" + sg.hashCode()); sg.setIdColour(col); - AlignmentPanel[] aps = getAssociatedPanels(); for (int a = 0; a < aps.length; a++) { if (aps[a].av.getGlobalColourScheme() != null @@ -930,6 +930,11 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, aps[a].av.alignment.addGroup(sg); } } + // notify the panel to redo any group specific stuff. + for (int a=0;a