JAL-3509 JAL-1842 minor tidying of code
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 6 Feb 2020 16:20:13 +0000 (16:20 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 6 Feb 2020 16:20:13 +0000 (16:20 +0000)
src/jalview/gui/CutAndPasteTransfer.java
src/jalview/gui/SequenceFetcher.java
src/jalview/io/FileLoader.java

index b3bff0d..279d89f 100644 (file)
@@ -272,11 +272,8 @@ public class CutAndPasteTransfer extends GCutAndPasteTransfer
        */
       if (viewport != null && viewport.getAlignment() != null)
       {
-        if (proxyColourScheme != null)
-        {
-          viewport.applyFeaturesStyle(proxyColourScheme);
-        }
         ((AlignViewport) viewport).addAlignment(al, title);
+        viewport.applyFeaturesStyle(proxyColourScheme);
       }
       else
       {
index 1c4e6a6..7451646 100755 (executable)
@@ -1023,10 +1023,7 @@ public class SequenceFetcher extends JPanel implements Runnable
           }
         }
 
-        if (preferredFeatureColours != null)
-        {
-          af.getViewport().applyFeaturesStyle(preferredFeatureColours);
-        }
+        af.getViewport().applyFeaturesStyle(preferredFeatureColours);
         if (Cache.getDefault("HIDE_INTRONS", true))
         {
           af.hideFeatureColumns(SequenceOntologyI.EXON, false);
index 3afbaad..20db946 100755 (executable)
@@ -391,12 +391,9 @@ public class FileLoader implements Runnable
                   .getFeatureColourScheme();
           if (viewport != null)
           {
-            if (proxyColourScheme != null)
-            {
-              viewport.applyFeaturesStyle(proxyColourScheme);
-            }
             // append to existing alignment
             viewport.addAlignment(al, title);
+            viewport.applyFeaturesStyle(proxyColourScheme);
           }
           else
           {