From 9d5b115c3b60ca2ae4bfb796088d8ca753d46b07 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Tue, 25 Jul 2006 15:50:35 +0000 Subject: [PATCH] Odd edit bug with represented seqs fixed --- src/jalview/gui/SeqPanel.java | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index 9d6b925..9ea087e 100755 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -883,10 +883,17 @@ public class SeqPanel extends JPanel implements MouseListener, return; } + int alWidth = av.alignment.getWidth(); + if(av.hasHiddenRows) + { + int hwidth = av.alignment.getHiddenSequences().getWidth(); + if(hwidth>alWidth) + alWidth = hwidth; + } //We can still insert gaps if the selectionGroup //contains all the sequences sg.setEndRes(sg.getEndRes()+startres-lastres); - fixedRight = av.alignment.getWidth()+startres-lastres; + fixedRight = alWidth+startres-lastres; } else { @@ -969,19 +976,6 @@ public class SeqPanel extends JPanel implements MouseListener, { if (fixedColumns && fixedRight != -1) { - /*if (sg!=null && - sg.getStartRes() == 0 - && sg.getEndRes() == fixedRight - && !jalview.util.Comparison.isGap(seq.getCharAt(fixedRight))) - { - System.out.println("still here"); - //Single sequence edit, whole sequence selected, - //extend the selection group - sg.setEndRes(av.alignment.getWidth() -1 + startres - lastres); - fixedColumns = false; - insertChar(j, seq); - } - else*/ insertChar(j, seq, fixedRight); } else @@ -1038,6 +1032,9 @@ public class SeqPanel extends JPanel implements MouseListener, if (blankColumn <= j) { + System.out.println("END HERE "+seq.getName()+" "+seq.getLength()+" "+j+" " + +blankColumn+" "+fixedColumn); + blankColumn = fixedColumn; endEditing(); return; } -- 1.7.10.2