fix for JAL-2922 - update states all at once and then refresh
authorJim Procter <jprocter@issues.jalview.org>
Tue, 27 Feb 2018 11:07:48 +0000 (11:07 +0000)
committerJim Procter <jprocter@issues.jalview.org>
Tue, 27 Feb 2018 11:07:48 +0000 (11:07 +0000)
src/jalview/gui/FeatureSettings.java

index 3f1d9c7..6130ef8 100644 (file)
@@ -961,12 +961,12 @@ public class FeatureSettings extends JPanel
 
   public void invertSelection()
   {
-    for (int i = 0; i < table.getRowCount(); i++)
+    Object[][] data = ((FeatureTableModel) table.getModel()).getData();
+    for (int i = 0; i < data.length; i++)
     {
-      Boolean value = (Boolean) table.getValueAt(i, 2);
-
-      table.setValueAt(new Boolean(!value.booleanValue()), i, 2);
+      data[i][1] = !(Boolean) data[i][1];
     }
+    af.alignPanel.paintAlignment(true, true);
   }
 
   public void orderByAvWidth()