From c295dd6ec0487b99ee6b7625fcab12c3d72028f0 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 15 Apr 2005 15:16:54 +0000 Subject: [PATCH] clustalx exception in colourchange --- src/jalview/gui/AlignFrame.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) 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()) { -- 1.7.10.2