JAL-3158 additional calls to reset 'selection changed' flag after update bug/JAL-3158selectionBroadcasts
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 28 Nov 2018 12:01:17 +0000 (12:01 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 28 Nov 2018 12:01:17 +0000 (12:01 +0000)
src/jalview/gui/AlignFrame.java
src/jalview/gui/ScalePanel.java
src/jalview/viewmodel/AlignmentViewport.java

index 94b38ed..b5298ae 100644 (file)
@@ -2406,6 +2406,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 e6bba02..42d3183 100755 (executable)
@@ -318,12 +318,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 1366ada..03807c5 100644 (file)
@@ -1636,6 +1636,7 @@ public abstract class AlignmentViewport
   public void invertColumnSelection()
   {
     colSel.invertColumnSelection(0, alignment.getWidth(), alignment);
+    isColSelChanged(true);
   }
 
   @Override