From 187b75ac779575fa0399f7c3991dcd7bade8ca90 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 11 Jul 2005 14:05:44 +0000 Subject: [PATCH] check groupsize is non zero --- src/jalview/appletgui/AlignFrame.java | 3 ++- src/jalview/gui/AlignFrame.java | 3 ++- src/jalview/gui/AlignViewport.java | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index 079a756..491d2be 100755 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -567,7 +567,8 @@ public class AlignFrame int start=0, end = viewport.alignment.getWidth(); - if(viewport.getSelectionGroup()!=null) + if(viewport.getSelectionGroup()!=null + || viewport.getSelectionGroup().sequences.size()<1) { seqs = viewport.getSelectionGroup().sequences; start = viewport.getSelectionGroup().getStartRes(); diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 2f7e5a8..9ce03f4 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -917,7 +917,8 @@ public class AlignFrame extends GAlignFrame int start = 0; int end = viewport.alignment.getWidth(); - if (viewport.getSelectionGroup() != null) + if (viewport.getSelectionGroup() != null + || viewport.getSelectionGroup().sequences.size()<1) { seqs = viewport.getSelectionGroup().sequences; start = viewport.getSelectionGroup().getStartRes(); diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index e8f34d8..3af97ab 100755 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -58,7 +58,7 @@ public class AlignViewport ColourSchemeI globalColourScheme = null; boolean conservationColourSelected = false; boolean abovePIDThreshold = false; - SequenceGroup selectionGroup = new SequenceGroup(); + SequenceGroup selectionGroup; int charHeight; int charWidth; int chunkWidth; -- 1.7.10.2