JAL-2506 allow graduated colour as default in new Sequence Feature
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 4 May 2017 16:08:59 +0000 (17:08 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 4 May 2017 16:08:59 +0000 (17:08 +0100)
dialog

src/jalview/gui/FeatureRenderer.java

index 5f257c7..50a8689 100644 (file)
@@ -165,7 +165,8 @@ public class FeatureRenderer extends
         {
           if (fcc == null)
           {
-            final String type = features.get(featureIndex).getType();
+            final String ft = features.get(featureIndex).getType();
+            final String type = ft == null ? lastFeatureAdded : ft;
             fcc = new FeatureColourChooser(me, type);
             fcc.setRequestFocusEnabled(true);
             fcc.requestFocus();