JAL-3364 align split frame sequence panels with wrapped view scale left
[jalview.git] / src / jalview / gui / SeqPanel.java
index 6bc1ad8..d64a034 100644 (file)
@@ -255,11 +255,6 @@ public class SeqPanel extends JPanel
 
   int wrappedBlock = -1;
 
-  MousePos findMousePosition(MouseEvent evt)
-  {
-    return findMousePosition(evt, null);
-  }
-
   /**
    * Computes the column and sequence row (and possibly annotation row when in
    * wrapped mode) for the given mouse position
@@ -267,22 +262,15 @@ public class SeqPanel extends JPanel
    * @param evt
    * @return
    */
-  MousePos findMousePosition(MouseEvent evt, String debug)
+  MousePos findMousePosition(MouseEvent evt)
   {
-    int col = findColumn(evt, debug);
+    int col = findColumn(evt);
     int seqIndex = -1;
     int annIndex = -1;
     int y = evt.getY();
 
     int charHeight = av.getCharHeight();
     int alignmentHeight = av.getAlignment().getHeight();
-    if (debug != null)
-    {
-      System.out.println(String.format(
-              "%s: charHeight %d alHeight %d canvasWidth %d canvasHeight %d",
-              debug, charHeight, alignmentHeight, seqCanvas.getWidth(),
-              seqCanvas.getHeight()));
-    }
     if (av.getWrapAlignment())
     {
       seqCanvas.calculateWrappedGeometry(seqCanvas.getWidth(),
@@ -343,11 +331,6 @@ public class SeqPanel extends JPanel
    */
   int findColumn(MouseEvent evt)
   {
-    return findColumn(evt, null);
-  }
-
-  int findColumn(MouseEvent evt, String debug)
-  {
     int res = 0;
     int x = evt.getX();
 
@@ -368,14 +351,6 @@ public class SeqPanel extends JPanel
       int y = evt.getY();
       y = Math.max(0, y - hgap);
       x -= seqCanvas.getLabelWidthWest();
-      if (debug != null)
-      {
-        System.out.println(
-                String.format("%s: %s %d x %d labelWest %d charWidth %d ",
-                        debug, Thread.currentThread().getName(),
-                        System.currentTimeMillis(), x,
-                        seqCanvas.getLabelWidthWest(), charWidth));
-      }
       if (x < 0)
       {
         // mouse is over left scale
@@ -389,10 +364,6 @@ public class SeqPanel extends JPanel
       }
       if (x >= cwidth * charWidth)
       {
-        if (debug != null)
-        {
-          System.out.println(debug + ": cwidth = " + cwidth);
-        }
         // mouse is over right scale
         return -1;
       }
@@ -1282,7 +1253,6 @@ public class SeqPanel extends JPanel
             SplitFrame splitFrame = (SplitFrame) ap.alignFrame
                     .getSplitViewContainer();
             splitFrame.adjustLayout();
-            splitFrame.repaint();
           }
         }
       }
@@ -1316,7 +1286,6 @@ public class SeqPanel extends JPanel
             SplitFrame splitFrame = (SplitFrame) ap.alignFrame
                     .getSplitViewContainer();
             splitFrame.adjustLayout();
-            splitFrame.repaint();
           }
         }
       }