Merge branch 'bug/JAL-3158selectionBroadcasts' into merge/JAL-3158
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 1 Mar 2019 10:57:17 +0000 (10:57 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 1 Mar 2019 10:57:17 +0000 (10:57 +0000)
src/jalview/gui/AlignFrame.java
src/jalview/gui/ScalePanel.java
src/jalview/viewmodel/AlignmentViewport.java

index 36db248..03daeb4 100644 (file)
@@ -2413,6 +2413,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
 
     sg.setEndRes(viewport.getAlignment().getWidth() - 1);
     viewport.setSelectionGroup(sg);
+    viewport.isSelectionGroupChanged(true);
     viewport.sendSelection();
     // JAL-2034 - should delegate to
     // alignPanel to decide if overview needs
index 5821b61..d181804 100755 (executable)
@@ -311,12 +311,17 @@ public class ScalePanel extends JPanel
     }
     stretchingGroup = false;
     ap.paintAlignment(false, false);
+    av.isSelectionGroupChanged(true);
+    av.isColSelChanged(true);
     av.sendSelection();
   }
 
   /**
    * Action on dragging the mouse in the scale panel is to expand or shrink the
-   * selection group range (including any hidden columns that it spans)
+   * selection group range (including any hidden columns that it spans). Note
+   * that the selection is only broadcast at the start of the drag (on
+   * mousePressed) and at the end (on mouseReleased), to avoid overload
+   * redrawing of other views.
    * 
    * @param evt
    */
index ca32ee7..0f56561 100644 (file)
@@ -1636,6 +1636,7 @@ public abstract class AlignmentViewport
   public void invertColumnSelection()
   {
     colSel.invertColumnSelection(0, alignment.getWidth(), alignment);
+    isColSelChanged(true);
   }
 
   @Override