Remove start end for now??
[jalview.git] / src / jalview / gui / ScalePanel.java
index b3d7cda..29e338c 100755 (executable)
@@ -121,7 +121,7 @@ public class ScalePanel extends JPanel implements MouseMotionListener, MouseList
             {\r
               public void actionPerformed(ActionEvent e)\r
               {\r
-                av.getColumnSelection().hideColumns(res, av);\r
+                av.hideColumns(res, res+1);\r
                 ap.repaint();\r
                 if(ap.overviewPanel != null)\r
                   ap.overviewPanel.updateOverviewImage();\r
@@ -401,20 +401,29 @@ public class ScalePanel extends JPanel implements MouseMotionListener, MouseList
         {\r
           gg.setColor(Color.blue);\r
           int res;\r
-          for (int i = 0; i < av.getColumnSelection().getHiddenColumns().size(); i++)\r
+          if(av.getShowHiddenMarkers())\r
           {\r
-            res = av.getColumnSelection().findHiddenRegionPosition( i )-startx;\r
+            for (int i = 0; i < av.getColumnSelection().getHiddenColumns().size();\r
+                 i++)\r
+            {\r
+\r
+              res = av.getColumnSelection().findHiddenRegionPosition(i) -\r
+                  startx;\r
 \r
-            gg.fillPolygon(new int[] { res*av.charWidth - av.charHeight/4,\r
-                                         res*av.charWidth + av.charHeight/4,\r
-                                         res*av.charWidth },\r
-                                new int[]\r
-                                {\r
-                                    y-av.charHeight/2 , y-av.charHeight/2 ,\r
-                                    y + 8\r
-                                }, 3);\r
+              if(res < 0 || res > endx-scalestartx)\r
+                continue;\r
 \r
+              gg.fillPolygon(new int[]\r
+                             {res * av.charWidth - av.charHeight / 4,\r
+                             res * av.charWidth + av.charHeight / 4,\r
+                             res * av.charWidth},\r
+                             new int[]\r
+                             {\r
+                             y - av.charHeight / 2, y - av.charHeight / 2,\r
+                             y + 8\r
+              }, 3);\r
 \r
+            }\r
           }\r
 \r
           if (reveal != null && reveal[0] > startx && reveal[0] < endx)\r