X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FScalePanel.java;h=29e338cc88fb910c8f794cec3f87c807909b056a;hb=91c5d2144a780716e755e99882acffe46b40f18f;hp=b3d7cda24aa4d1e132b5d53781a686280ec4326b;hpb=df9b85c1cf39894039018499fe802406cc37f209;p=jalview.git diff --git a/src/jalview/gui/ScalePanel.java b/src/jalview/gui/ScalePanel.java index b3d7cda..29e338c 100755 --- a/src/jalview/gui/ScalePanel.java +++ b/src/jalview/gui/ScalePanel.java @@ -121,7 +121,7 @@ public class ScalePanel extends JPanel implements MouseMotionListener, MouseList { public void actionPerformed(ActionEvent e) { - av.getColumnSelection().hideColumns(res, av); + av.hideColumns(res, res+1); ap.repaint(); if(ap.overviewPanel != null) ap.overviewPanel.updateOverviewImage(); @@ -401,20 +401,29 @@ public class ScalePanel extends JPanel implements MouseMotionListener, MouseList { gg.setColor(Color.blue); int res; - for (int i = 0; i < av.getColumnSelection().getHiddenColumns().size(); i++) + if(av.getShowHiddenMarkers()) { - res = av.getColumnSelection().findHiddenRegionPosition( i )-startx; + for (int i = 0; i < av.getColumnSelection().getHiddenColumns().size(); + i++) + { + + res = av.getColumnSelection().findHiddenRegionPosition(i) - + startx; - gg.fillPolygon(new int[] { res*av.charWidth - av.charHeight/4, - res*av.charWidth + av.charHeight/4, - res*av.charWidth }, - new int[] - { - y-av.charHeight/2 , y-av.charHeight/2 , - y + 8 - }, 3); + if(res < 0 || res > endx-scalestartx) + continue; + gg.fillPolygon(new int[] + {res * av.charWidth - av.charHeight / 4, + res * av.charWidth + av.charHeight / 4, + res * av.charWidth}, + new int[] + { + y - av.charHeight / 2, y - av.charHeight / 2, + y + 8 + }, 3); + } } if (reveal != null && reveal[0] > startx && reveal[0] < endx)