check cursor is visible for hidden cols
[jalview.git] / src / jalview / appletgui / IdPanel.java
index 27cbce1..03f5b25 100755 (executable)
@@ -1,6 +1,6 @@
 /*\r
  * Jalview - A Sequence Alignment Editor and Viewer\r
- * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
+ * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
  *\r
  * This program is free software; you can redistribute it and/or\r
  * modify it under the terms of the GNU General Public License\r
@@ -230,6 +230,12 @@ public class IdPanel
   {\r
 \r
     lastid = start;\r
+\r
+    if (end >= av.getAlignment().getHeight())\r
+    {\r
+      end = av.getAlignment().getHeight() - 1;\r
+    }\r
+\r
     if (end < start)\r
     {\r
       int tmp = start;\r
@@ -256,7 +262,7 @@ public class IdPanel
       av.getSelectionGroup().recalcConservation();\r
 \r
     mouseDragging = false;\r
-    PaintRefresher.Refresh(this, av.alignment);\r
+    PaintRefresher.Refresh(this, av.getSequenceSetId());\r
   }\r
 \r
   public void highlightSearchResults(java.util.Vector found)\r