From: amwaterhouse Date: Fri, 15 Apr 2005 15:16:54 +0000 (+0000) Subject: clustalx exception in colourchange X-Git-Tag: Release_2_0~402 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=c295dd6ec0487b99ee6b7625fcab12c3d72028f0;p=jalview.git clustalx exception in colourchange --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index b00a584..3625e45 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -821,10 +821,20 @@ public class AlignFrame extends GAlignFrame { SequenceGroup sg = (SequenceGroup)groups.elementAt(i); - - try{ - sg.cs = (ColourSchemeI)cs.getClass().newInstance(); - }catch(Exception ex){} + if (cs instanceof ClustalxColourScheme) + { + sg.cs = new ClustalxColourScheme(sg.sequences, sg.getWidth()); + } + else + try + { + sg.cs = (ColourSchemeI) cs.getClass().newInstance(); + } + catch (Exception ex) + { + ex.printStackTrace(); + sg.cs = cs; + } if(viewport.getAbovePIDThreshold()) {