From 4cb8a2457311f8f01339eb80430a09b702c8fd62 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Wed, 31 May 2017 16:12:17 +0100 Subject: [PATCH] JAL-2483 JAL-2575 don't sort newly discovered features --- .../seqfeatures/FeatureRendererModel.java | 49 ++------------------ 1 file changed, 4 insertions(+), 45 deletions(-) diff --git a/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java b/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java index eb47a80..1af491c 100644 --- a/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java +++ b/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java @@ -35,7 +35,6 @@ import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Hashtable; @@ -330,48 +329,19 @@ public abstract class FeatureRendererModel implements } } } - // <<<<<<< HEAD - // - // ======= - // if (minmax == null) - // { - // minmax = new Hashtable(); - // } - // - // Set oldGroups = new HashSet(featureGroups.keySet()); - // >>>>>>> refs/heads/develop + AlignmentI alignment = av.getAlignment(); - List allfeatures = new ArrayList(); // or HashSet? + List allfeatures = new ArrayList(); for (int i = 0; i < alignment.getHeight(); i++) { SequenceI asq = alignment.getSequenceAt(i); for (String group : asq.getFeatures().getFeatureGroups(true)) { - // <<<<<<< HEAD - /* - * features in null group are always displayed; other groups - * keep their current visibility; new groups as 'newMadeVisible' - */ boolean groupDisplayed = true; if (group != null) - // ======= - // continue; - // } - // - // int index = 0; - // while (index < features.length) - // { - // String fgrp = features[index].getFeatureGroup(); - // oldGroups.remove(fgrp); - // if (!featuresDisplayed.isRegistered(features[index].getType())) - // >>>>>>> refs/heads/develop { - // <<<<<<< HEAD if (featureGroups.containsKey(group)) - // ======= - // if (fgrp != null) - // >>>>>>> refs/heads/develop { groupDisplayed = featureGroups.get(group); } @@ -397,11 +367,8 @@ public abstract class FeatureRendererModel implements } } - /* - //<<<<<<< HEAD - * mark any new feature types as visible - */ - Collections.sort(allfeatures, String.CASE_INSENSITIVE_ORDER); + // uncomment to add new features in alphebetical order (but JAL-2575) + // Collections.sort(allfeatures, String.CASE_INSENSITIVE_ORDER); if (newMadeVisible) { for (String type : allfeatures) @@ -412,14 +379,6 @@ public abstract class FeatureRendererModel implements setOrder(type, 0); } } - // ======= - // * oldGroups now consists of groups that no longer - // * have any feature in them - remove these - // */ - // for (String grp : oldGroups) - // { - // featureGroups.remove(grp); - // >>>>>>> refs/heads/develop } updateRenderOrder(allfeatures); -- 1.7.10.2