check groupsize is non zero
authoramwaterhouse <Andrew Waterhouse>
Mon, 11 Jul 2005 14:05:44 +0000 (14:05 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 11 Jul 2005 14:05:44 +0000 (14:05 +0000)
src/jalview/appletgui/AlignFrame.java
src/jalview/gui/AlignFrame.java
src/jalview/gui/AlignViewport.java

index 079a756..491d2be 100755 (executable)
@@ -567,7 +567,8 @@ public class AlignFrame
 \r
     int start=0, end = viewport.alignment.getWidth();\r
 \r
-    if(viewport.getSelectionGroup()!=null)\r
+    if(viewport.getSelectionGroup()!=null\r
+     || viewport.getSelectionGroup().sequences.size()<1)\r
     {\r
       seqs = viewport.getSelectionGroup().sequences;\r
       start = viewport.getSelectionGroup().getStartRes();\r
index 2f7e5a8..9ce03f4 100755 (executable)
@@ -917,7 +917,8 @@ public class AlignFrame extends GAlignFrame
         int start = 0;\r
         int end = viewport.alignment.getWidth();\r
 \r
-        if (viewport.getSelectionGroup() != null)\r
+        if (viewport.getSelectionGroup() != null\r
+            || viewport.getSelectionGroup().sequences.size()<1)\r
         {\r
             seqs = viewport.getSelectionGroup().sequences;\r
             start = viewport.getSelectionGroup().getStartRes();\r
index e8f34d8..3af97ab 100755 (executable)
@@ -58,7 +58,7 @@ public class AlignViewport
     ColourSchemeI globalColourScheme = null;\r
     boolean conservationColourSelected = false;\r
     boolean abovePIDThreshold = false;\r
-    SequenceGroup selectionGroup = new SequenceGroup();\r
+    SequenceGroup selectionGroup;\r
     int charHeight;\r
     int charWidth;\r
     int chunkWidth;\r