JAL-3010 pop-up sort including sub-types when in Summary View
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 4 Jun 2018 09:20:20 +0000 (10:20 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 4 Jun 2018 09:20:20 +0000 (10:20 +0100)
src/jalview/gui/FeatureSettings.java

index debf63c..5f06439 100644 (file)
@@ -438,29 +438,23 @@ public class FeatureSettings extends JPanel
     final FeatureSettings me = this;
     scr.addActionListener(new ActionListener()
     {
-
       @Override
       public void actionPerformed(ActionEvent e)
       {
-        me.af.avc
-                .sortAlignmentByFeatureScore(Arrays.asList(new String[]
-                { type }));
+        String[] types = getTermsInScope(type);
+        me.af.avc.sortAlignmentByFeatureScore(Arrays.asList(types));
       }
-
     });
     JMenuItem dens = new JMenuItem(
             MessageManager.getString("label.sort_by_density"));
     dens.addActionListener(new ActionListener()
     {
-
       @Override
       public void actionPerformed(ActionEvent e)
       {
-        me.af.avc
-                .sortAlignmentByFeatureDensity(Arrays.asList(new String[]
-                { type }));
+        String[] types = getTermsInScope(type);
+        me.af.avc.sortAlignmentByFeatureDensity(Arrays.asList(types));
       }
-
     });
     men.add(dens);