From 61509c9b5a1b436e5dcad341dbeeb3fd1511a7be Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 6 Feb 2020 16:20:13 +0000 Subject: [PATCH] JAL-3509 JAL-1842 minor tidying of code --- src/jalview/gui/CutAndPasteTransfer.java | 5 +---- src/jalview/gui/SequenceFetcher.java | 5 +---- src/jalview/io/FileLoader.java | 5 +---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/jalview/gui/CutAndPasteTransfer.java b/src/jalview/gui/CutAndPasteTransfer.java index b3bff0d..279d89f 100644 --- a/src/jalview/gui/CutAndPasteTransfer.java +++ b/src/jalview/gui/CutAndPasteTransfer.java @@ -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 { diff --git a/src/jalview/gui/SequenceFetcher.java b/src/jalview/gui/SequenceFetcher.java index 1c4e6a6..7451646 100755 --- a/src/jalview/gui/SequenceFetcher.java +++ b/src/jalview/gui/SequenceFetcher.java @@ -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); diff --git a/src/jalview/io/FileLoader.java b/src/jalview/io/FileLoader.java index 3afbaad..20db946 100755 --- a/src/jalview/io/FileLoader.java +++ b/src/jalview/io/FileLoader.java @@ -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 { -- 1.7.10.2