From ef2f3ba1a36fe7512e80bc1a3ce92d689f40b358 Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 18 Feb 2011 17:19:53 +0000 Subject: [PATCH] JAl-574 --- src/jalview/gui/SeqPanel.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index d176b86..a1913a8 100755 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -1882,6 +1882,7 @@ public class SeqPanel extends JPanel implements MouseListener, // shared between viewports. if (av == source || !av.followSelection + || (av.isSelectionGroupChanged(false) || av.isColSelChanged(false)) || (source instanceof AlignViewport && ((AlignViewport) source) .getSequenceSetId().equals(av.getSequenceSetId()))) { @@ -1892,7 +1893,7 @@ public class SeqPanel extends JPanel implements MouseListener, // rules are: colsel is copied if there is a real intersection between // sequence selection boolean repaint = false, copycolsel = true; - if (av.selectionGroup == null || !av.isSelectionGroupChanged()) + // if (!av.isSelectionGroupChanged(false)) { SequenceGroup sgroup = null; if (seqsel != null && seqsel.getSize()>0) @@ -1907,7 +1908,7 @@ public class SeqPanel extends JPanel implements MouseListener, sgroup = seqsel.intersect(av.alignment, (av.hasHiddenRows) ? av.hiddenRepSequences : null); if ((sgroup == null || sgroup.getSize() == 0) - && (colsel == null || colsel.size() == 0)) + || (colsel == null || colsel.size() == 0)) { // don't copy columns if the region didn't intersect. copycolsel = false; @@ -1921,9 +1922,10 @@ public class SeqPanel extends JPanel implements MouseListener, { av.setSelectionGroup(null); } - repaint = av.isSelectionGroupChanged(); + av.isSelectionGroupChanged(true); + repaint = true; } - if (copycolsel && (av.colSel == null || !av.isColSelChanged())) + if (copycolsel) { // the current selection is unset or from a previous message // so import the new colsel. @@ -1932,6 +1934,7 @@ public class SeqPanel extends JPanel implements MouseListener, if (av.colSel != null) { av.colSel.clear(); + repaint=true; } } else @@ -1946,7 +1949,8 @@ public class SeqPanel extends JPanel implements MouseListener, av.colSel.setElementsFrom(colsel); } } - repaint |= av.isColSelChanged(); + av.isColSelChanged(true); + repaint = true; } if (copycolsel && av.hasHiddenColumns && (av.colSel == null || av.colSel.getHiddenColumns() == null)) -- 1.7.10.2