Merge branch 'JAL-1013_pca_rna_dna' into develop
[jalview.git] / src / jalview / gui / RotatableCanvas.java
index f3312c3..458a29d 100755 (executable)
@@ -138,14 +138,16 @@ public class RotatableCanvas extends JPanel implements MouseListener,
     repaint();
   }
 
+  boolean first=true;
   public void setPoints(Vector points, int npoint)
   {
     this.points = points;
     this.npoint = npoint;
+    if (first) {
     ToolTipManager.sharedInstance().registerComponent(this);
     ToolTipManager.sharedInstance().setInitialDelay(0);
     ToolTipManager.sharedInstance().setDismissDelay(10000);
-
+    }
     prefsize = getPreferredSize();
     orig = new float[npoint][3];
 
@@ -186,11 +188,13 @@ public class RotatableCanvas extends JPanel implements MouseListener,
     findWidth();
 
     scale = findScale();
-
+    if (first) {
+      
     addMouseListener(this);
 
     addMouseMotionListener(this);
-
+    }
+    first=false;
   }
 
   public void initAxes()