JAL-3518 corrected action on pulled up closeViewer()
[jalview.git] / src / jalview / fts / core / FTSDataColumnPreferences.java
index 1a8f398..e5042ae 100644 (file)
@@ -109,9 +109,9 @@ public class FTSDataColumnPreferences extends JScrollPane
       switch (source)
       {
       case SEARCH_SUMMARY:
-        data[x++] = new Object[] {
-            ftsRestClient.getAllDefaultDisplayedFTSDataColumns().contains(
-                    field), field.getName(), field.getGroup() };
+        data[x++] = new Object[] { ftsRestClient
+                .getAllDefaultDisplayedFTSDataColumns().contains(field),
+            field.getName(), field.getGroup() };
         break;
       case STRUCTURE_CHOOSER:
         data[x++] = new Object[] { structSummaryColumns.contains(field),
@@ -119,9 +119,9 @@ public class FTSDataColumnPreferences extends JScrollPane
         break;
       case PREFERENCES:
         data[x++] = new Object[] {
-            field.getName(),
-            ftsRestClient.getAllDefaultDisplayedFTSDataColumns().contains(
-                    field), structSummaryColumns.contains(field) };
+            field.getName(), ftsRestClient
+                    .getAllDefaultDisplayedFTSDataColumns().contains(field),
+            structSummaryColumns.contains(field) };
         break;
       default:
         break;
@@ -155,7 +155,6 @@ public class FTSDataColumnPreferences extends JScrollPane
       int columnIndexToSort = 2;
       sortKeys.add(new RowSorter.SortKey(columnIndexToSort,
               SortOrder.ASCENDING));
-      sorter.setSortKeys(sortKeys);
       sorter.setComparator(columnIndexToSort,
               new Comparator<FTSDataColumnGroupI>()
               {
@@ -166,7 +165,8 @@ public class FTSDataColumnPreferences extends JScrollPane
                   return o1.getSortOrder() - o2.getSortOrder();
                 }
               });
-      sorter.sort();
+      sorter.setSortKeys(sortKeys);
+      // BH 2018 setSortKeys does a sort      sorter.sort();
 
       tbl_FTSDataColumnPrefs
               .setAutoResizeMode(JTable.AUTO_RESIZE_NEXT_COLUMN);