/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
featureGroups = fr.featureGroups;
featureColours = fr.featureColours;
transparency = fr.transparency;
+ if (av!=null && fr.av!=null && fr.av!=av)
+ {
+ if (fr.av.featuresDisplayed!=null)
+ {
+ if (av.featuresDisplayed==null)
+ {
+ av.featuresDisplayed = new Hashtable();
+ } else {
+ av.featuresDisplayed.clear();
+ }
+ Enumeration en=fr.av.featuresDisplayed.keys();
+ while (en.hasMoreElements())
+ {
+ av.featuresDisplayed.put(en.nextElement(), Boolean.TRUE);
+ }
+ }
+ }
}
static String lastFeatureAdded;
for (int i = 0; i < toset.length; i++)
{
Object st = featureGroups.get(toset[i]);
+ featureGroups.put(toset[i], new Boolean(visible));
if (st != null)
{
- featureGroups.put(toset[i], new Boolean(visible));
rdrw = rdrw || (visible != ((Boolean) st).booleanValue());
}
}
}
}
+ ArrayList<String> hiddenGroups=new ArrayList<String>();
/**
* analyse alignment for groups and hash tables (used to be embedded in
* FeatureSettings.setTableData)
{
featureGroups = new Hashtable();
}
- Vector allFeatures = new Vector();
- Vector allGroups = new Vector();
+ hiddenGroups =new ArrayList<String>();
+ hiddenGroups.addAll(featureGroups.keySet());
+ ArrayList allFeatures = new ArrayList();
+ ArrayList allGroups = new ArrayList();
SequenceFeature[] tmpfeatures;
String group;
for (int i = 0; i < av.alignment.getHeight(); i++)
if (tmpfeatures[index].getFeatureGroup() != null)
{
group = tmpfeatures[index].featureGroup;
+ // Remove group from the hiddenGroup list
+ hiddenGroups.remove(group);
if (!allGroups.contains(group))
{
- allGroups.addElement(group);
+ allGroups.add(group);
boolean visible = true;
if (featureGroups.containsKey(group))
if (!allFeatures.contains(tmpfeatures[index].getType()))
{
- allFeatures.addElement(tmpfeatures[index].getType());
+ allFeatures.add(tmpfeatures[index].getType());
}
index++;
}