*/
package jalview.gui;
+import static org.testng.Assert.assertFalse;
import static org.testng.AssertJUnit.assertEquals;
import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
regions = currentHidden.getHiddenColumnsCopy();
assertEquals(regions.get(0)[0], 10);
assertEquals(regions.get(0)[1], 20);
+
+ // check works with empty hidden columns as old columns
+ oldhidden = new HiddenColumns();
+ acc.setOldHiddenColumns(oldhidden);
+ acc.reset();
+ currentHidden = af.getViewport().getAlignment().getHiddenColumns();
+ assertFalse(currentHidden.hasHiddenColumns());
+
+ // check works with empty hidden columns as new columns
+ oldhidden.hideColumns(10, 20);
+ acc.setOldHiddenColumns(oldhidden);
+ currentHidden = af.getViewport().getAlignment().getHiddenColumns();
+ assertFalse(currentHidden.hasHiddenColumns());
+
+ acc.reset();
+ currentHidden = af.getViewport().getAlignment().getHiddenColumns();
+ regions = currentHidden.getHiddenColumnsCopy();
+ assertEquals(regions.get(0)[0], 10);
+ assertEquals(regions.get(0)[1], 20);
}
}