removal of AlignmentFrame lines
[jalview.git] / src / jalview / gui / ScalePanel.java
index ea4b42b..5da14b3 100755 (executable)
@@ -267,10 +267,10 @@ public class ScalePanel extends JPanel
   }
 
   /**
-   * DOCUMENT ME!
+   * Action on mouseUp is to set the limit of the current selection group (if
+   * there is one) and broadcast the selection
    * 
    * @param evt
-   *          DOCUMENT ME!
    */
   @Override
   public void mouseReleased(MouseEvent evt)
@@ -278,15 +278,14 @@ public class ScalePanel extends JPanel
     mouseDragging = false;
     ap.getSeqPanel().stopScrolling();
 
+    // todo res calculation should be a method on AlignViewport
     int res = (evt.getX() / av.getCharWidth())
             + av.getRanges().getStartRes();
-
     if (av.hasHiddenColumns())
     {
       res = av.getAlignment().getHiddenColumns()
               .visibleToAbsoluteColumn(res);
     }
-
     res = Math.min(res, av.getAlignment().getWidth() - 1);
 
     if (!stretchingGroup)
@@ -355,6 +354,7 @@ public class ScalePanel extends JPanel
   {
     if (mouseDragging)
     {
+      mouseDragging = false;
       ap.getSeqPanel().stopScrolling();
     }
   }
@@ -415,7 +415,7 @@ public class ScalePanel extends JPanel
   @Override
   public void paintComponent(Graphics g)
   {
-    super.paintComponent(g);
+    //super.paintComponent(g);  // BH 2019
 
     /*
      * shouldn't get called in wrapped mode as the scale above is