From: amwaterhouse Date: Tue, 25 Jul 2006 15:50:35 +0000 (+0000) Subject: Odd edit bug with represented seqs fixed X-Git-Tag: Release_2_1~209 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9d5b115c3b60ca2ae4bfb796088d8ca753d46b07;p=jalview.git Odd edit bug with represented seqs fixed --- 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; }