Set consensus as hashtble[]
[jalview.git] / src / jalview / gui / AnnotationPanel.java
index 5ddca62..fb48794 100755 (executable)
@@ -314,7 +314,7 @@ public class AnnotationPanel extends JPanel implements MouseListener,
         }\r
 \r
 \r
-        if (SwingUtilities.isRightMouseButton(evt))\r
+        if (SwingUtilities.isRightMouseButton(evt) && activeRow!=-1)\r
         {\r
             if (av.getColumnSelection() == null)\r
             {\r
@@ -418,8 +418,8 @@ public class AnnotationPanel extends JPanel implements MouseListener,
       if(graphStretch>-1)\r
       {\r
         av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight += graphStretchY - evt.getY();\r
-        if(av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight <10)\r
-          av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight = 10;\r
+        if(av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight <0)\r
+          av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight = 0;\r
         graphStretchY = evt.getY();\r
         adjustPanelHeight();\r
         ap.repaint();\r
@@ -952,7 +952,7 @@ public class AnnotationPanel extends JPanel implements MouseListener,
               }\r
           }\r
 \r
-            if (row.graph>0)\r
+            if (row.graph>0 && row.graphHeight>0)\r
             {\r
                 if(row.graph == AlignmentAnnotation.LINE_GRAPH )\r
                 {\r