JAL-2068 deleting user-defined annotation removes the worker
[jalview.git] / src / jalview / gui / AnnotationLabels.java
index f92d67f..7c5ae06 100755 (executable)
@@ -244,6 +244,7 @@ public class AnnotationLabels extends JPanel implements MouseListener,
     else if (evt.getActionCommand().equals(DELETE))
     {
       ap.av.getAlignment().deleteAnnotation(aa[selectedRow]);
+      ap.av.getCalcManager().removeWorkerForAnnotation(aa[selectedRow]);
     }
     else if (evt.getActionCommand().equals(SHOWALL))
     {
@@ -617,10 +618,10 @@ public class AnnotationLabels extends JPanel implements MouseListener,
         }
       }
     }
-    if (!evt.isPopupTrigger())
-    {
-      return;
-    }
+    // if (!evt.isPopupTrigger())
+    // {
+    // return;
+    // }
 
     JPopupMenu pop = new JPopupMenu(
             MessageManager.getString("label.annotations"));