From 38161ce28b562bfcc2d3059befb5a0acbf99151c Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Tue, 27 Feb 2018 11:07:48 +0000 Subject: [PATCH] fix for JAL-2922 - update states all at once and then refresh --- src/jalview/gui/FeatureSettings.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index 3f1d9c7..6130ef8 100644 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -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() -- 1.7.10.2