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)
committerJim Procter <j.procter@dundee.ac.uk>
Thu, 2 Sep 2021 13:09:06 +0000 (14:09 +0100)
src/jalview/gui/CutAndPasteTransfer.java
src/jalview/gui/SequenceFetcher.java
src/jalview/io/FileLoader.java

index d328a0d..3f64ff1 100644 (file)
@@ -274,11 +274,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 8b5d3b7..a4e7952 100755 (executable)
@@ -831,10 +831,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 3aa433e..c7c1d71 100755 (executable)
@@ -416,12 +416,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
           {