JAL-2844 somewhat better repainting
authorkjvdheide <kjvanderheide@dundee.ac.uk>
Wed, 29 Nov 2017 13:20:07 +0000 (13:20 +0000)
committerkjvdheide <kjvanderheide@dundee.ac.uk>
Wed, 29 Nov 2017 13:20:07 +0000 (13:20 +0000)
src/jalview/ext/archaeopteryx/JalviewBinding.java

index 393e29e..2bacfd5 100644 (file)
@@ -177,12 +177,9 @@ public final class JalviewBinding
           partitionTree(e.getX());
       }
         PaintRefresher.Refresh(treeView, parentAvport.getSequenceSetId());
-        treeView.repaint();
 
-        // MOVE
-        Graphics g = treeView.getGraphics();
-        int panelHeight = treeView.getHeight();
-        g.drawLine(e.getX(), 0, e.getX(), panelHeight);
+
+
       }
     });
 
@@ -232,6 +229,7 @@ public final class JalviewBinding
       }
 
 
+      treeView.repaint();
     }
 
 
@@ -250,11 +248,13 @@ public final class JalviewBinding
       if (longestBranch != 0)
       {
 
-
         // double relativeTreeWidth = longestBranch / viewWidth;
+        // MOVE
+        Graphics g = treeView.getGraphics();
+        int panelHeight = treeView.getHeight();
+        g.drawLine(x, 0, x, panelHeight);
 
         float rootX = tree.getRoot().getXcoord();
-
         double threshold = ((double) x - rootX) / longestBranch;
         List<PhylogenyNode> foundNodes = getNodesAboveThreshold(threshold,
                 longestBranch, tree.getRoot());