fix for JAL-1398 - original colourscheme is enabled if colourscheme has a BaseColour...
[jalview.git] / src / jalview / gui / AnnotationColourChooser.java
index 3278a76..5ee69f2 100644 (file)
@@ -120,18 +120,19 @@ public class AnnotationColourChooser extends JPanel
     // Always get default shading from preferences.
     setDefaultMinMax();
 
+    adjusting = true;
     if (oldcs instanceof AnnotationColourGradient)
     {
       AnnotationColourGradient acg = (AnnotationColourGradient) oldcs;
-      currentColours.setSelected(acg.isPredefinedColours());
-      if (!acg.isPredefinedColours())
+      currentColours.setSelected(acg.isPredefinedColours() || acg.getBaseColour()!=null);
+      if (!acg.isPredefinedColours() && acg.getBaseColour()==null)
       {
         minColour.setBackground(acg.getMinColour());
         maxColour.setBackground(acg.getMaxColour());
       }
       seqAssociated.setSelected(acg.isSeqAssociated());
+      
     }
-    adjusting = true;
     annotations = new JComboBox(
             getAnnotationItems(seqAssociated.isSelected()));