+ viewport.setStartRes(seq.findIndex(startRes)-1);\r
+\r
+ viewport.firePropertyChange("alignment", null, viewport.getAlignment().getSequences());\r
+ }\r
+\r
+ public void alignmentChanged()\r
+ {\r
+ if(viewport.vconsensus!=null)\r
+ {\r
+ viewport.updateConsensus();\r
+ viewport.updateConservation();\r
+ }\r
+ resetAllColourSchemes();\r
+ alignPanel.repaint();\r
+ }\r
+\r
+ void resetAllColourSchemes()\r
+ {\r
+ ColourSchemeI cs = viewport.globalColourScheme;\r
+ if(cs!=null)\r
+ {\r
+ if (cs instanceof ClustalxColourScheme)\r
+ {\r
+ ( (ClustalxColourScheme) viewport.getGlobalColourScheme()).\r
+ resetClustalX(viewport.alignment.getSequences(),\r
+ viewport.alignment.getWidth());\r
+ }\r
+\r
+ cs.setConsensus(viewport.vconsensus);\r
+ if (cs.conservationApplied())\r
+ {\r
+ Alignment al = (Alignment) viewport.alignment;\r
+ Conservation c = new Conservation("All",\r
+ ResidueProperties.propHash, 3,\r
+ al.getSequences(), 0,\r
+ al.getWidth() - 1);\r
+ c.calculate();\r
+ c.verdict(false, viewport.ConsPercGaps);\r
+\r
+ cs.setConservation(c);\r
+ }\r
+ }\r
+\r
+ int s, sSize = viewport.alignment.getGroups().size();\r
+ for(s=0; s<sSize; s++)\r
+ {\r
+ SequenceGroup sg = (SequenceGroup)viewport.alignment.getGroups().elementAt(s);\r
+ if(sg.cs!=null && sg.cs instanceof ClustalxColourScheme)\r
+ {\r
+ ((ClustalxColourScheme)sg.cs).resetClustalX(sg.sequences, sg.getWidth());\r
+ }\r
+ sg.recalcConservation();\r
+ }\r