From: Jim Procter Date: Tue, 27 Feb 2018 11:07:48 +0000 (+0000) Subject: fix for JAL-2922 - update states all at once and then refresh X-Git-Tag: Release_2_10_4~50^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=38161ce28b562bfcc2d3059befb5a0acbf99151c;p=jalview.git fix for JAL-2922 - update states all at once and then refresh --- 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()