this.displayText = displayText;
this.colourText = colourText;
this.cs = new ResidueShader(scheme);
- startRes = start;
+
+ if (start > 0) // sanity check for negative start column positions
+ {
+ startRes = start;
+ }
+ else
+ {
+ jalview.bin.Cache.log.warn(
+ "Negative start column index detected, resetting to default index: "
+ + startRes);
+ // start = startRes;
+ }
+
endRes = end;
recalcConservation();
}
displayBoxes = seqsel.displayBoxes;
displayText = seqsel.displayText;
colourText = seqsel.colourText;
- startRes = seqsel.startRes;
+
+ if (seqsel.startRes > 0) // sanity check for negative start column
+ // positions
+ {
+ startRes = seqsel.startRes;
+ }
+ else
+ {
+ jalview.bin.Cache.log.warn(
+ "Negative start column index detected, resetting to default index: "
+ + startRes);
+ // seqsel.startRes = startRes;
+ }
+
endRes = seqsel.endRes;
cs = new ResidueShader((ResidueShader) seqsel.cs);
if (seqsel.description != null)
--- /dev/null
+package jalview.gui;
+
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+public class ValidColumnSelectionTest
+{
+ @BeforeClass(alwaysRun = true)
+ public void setUpJvOptionPane()
+ {
+ JvOptionPane.setInteractiveMode(false);
+ JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+ }
+
+ @Test(groups = "Functional")
+ public void testColumnSelection()
+ {
+
+ }
+
+}