JAL-3093 added MousePos.isOverAnnotation() for extra clarity of
[jalview.git] / src / jalview / gui / IdPanel.java
index 94eab76..54aeef2 100755 (executable)
@@ -105,7 +105,7 @@ public class IdPanel extends JPanel
   {
     SeqPanel sp = alignPanel.getSeqPanel();
     MousePos pos = sp.findMousePosition(e);
-    if (pos.annotationIndex != -1)
+    if (pos.isOverAnnotation())
     {
       /*
        * mouse is over an annotation label in wrapped mode
@@ -141,7 +141,7 @@ public class IdPanel extends JPanel
     mouseDragging = true;
 
     MousePos pos = alignPanel.getSeqPanel().findMousePosition(e);
-    if (pos.annotationIndex != -1)
+    if (pos.isOverAnnotation())
     {
       // mouse is over annotation label in wrapped mode
       return;
@@ -219,7 +219,7 @@ public class IdPanel extends JPanel
     }
 
     MousePos pos = alignPanel.getSeqPanel().findMousePosition(e);
-    if (pos.annotationIndex != -1)
+    if (pos.isOverAnnotation())
     {
       // mouse is over annotation label in wrapped mode
       return;
@@ -306,7 +306,7 @@ public class IdPanel extends JPanel
     }
 
     MousePos pos = alignPanel.getSeqPanel().findMousePosition(e);
-    if (pos.annotationIndex != -1)
+    if (pos.isOverAnnotation())
     {
       // mouse is over an annotation label in wrapped mode
       return;
@@ -442,7 +442,7 @@ public class IdPanel extends JPanel
       scrollThread.running = false;
     }
     MousePos pos = alignPanel.getSeqPanel().findMousePosition(e);
-    if (pos.annotationIndex != -1)
+    if (pos.isOverAnnotation())
     {
       // mouse is over an annotation label in wrapped mode
       return;