{\r
seqCanvas.cursorX += dx;\r
seqCanvas.cursorY += dy;\r
+ if (av.hasHiddenColumns && !av.colSel.isVisible(seqCanvas.cursorX))\r
+ {\r
+ int original = seqCanvas.cursorX - dx;\r
+ int maxWidth = av.alignment.getWidth();\r
+\r
+ while(!av.colSel.isVisible(seqCanvas.cursorX)\r
+ && seqCanvas.cursorX<maxWidth\r
+ && seqCanvas.cursorX>0)\r
+ {\r
+ seqCanvas.cursorX += dx;\r
+ }\r
+\r
+ if(seqCanvas.cursorX>=maxWidth\r
+ || !av.colSel.isVisible(seqCanvas.cursorX) )\r
+ {\r
+ seqCanvas.cursorX = original;\r
+ }\r
+ }\r
scrollToVisible();\r
}\r
\r
{\r
ap.scrollUp(false);\r
}\r
- while (seqCanvas.cursorX < av.startRes)\r
+ while (seqCanvas.cursorX < av.colSel.adjustForHiddenColumns(av.startRes))\r
{\r
\r
if (!ap.scrollRight(false))\r
break;\r
}\r
- while (seqCanvas.cursorX > av.endRes)\r
+ while (seqCanvas.cursorX > av.colSel.adjustForHiddenColumns(av.endRes))\r
{\r
if (!ap.scrollRight(true))\r
break;\r
{\r
seqCanvas.cursorX += dx;\r
seqCanvas.cursorY += dy;\r
+ if (av.hasHiddenColumns && !av.colSel.isVisible(seqCanvas.cursorX))\r
+ {\r
+ int original = seqCanvas.cursorX - dx;\r
+ int maxWidth = av.alignment.getWidth();\r
+\r
+ while(!av.colSel.isVisible(seqCanvas.cursorX)\r
+ && seqCanvas.cursorX<maxWidth\r
+ && seqCanvas.cursorX>0)\r
+ {\r
+ seqCanvas.cursorX += dx;\r
+ }\r
+\r
+ if(seqCanvas.cursorX>=maxWidth\r
+ || !av.colSel.isVisible(seqCanvas.cursorX) )\r
+ {\r
+ seqCanvas.cursorX = original;\r
+ }\r
+ }\r
+\r
scrollToVisible();\r
}\r
\r
}\r
if (!av.wrapAlignment)\r
{\r
- while (seqCanvas.cursorX < av.startRes)\r
+ while (seqCanvas.cursorX < av.colSel.adjustForHiddenColumns(av.startRes))\r
{\r
if (!ap.scrollRight(false))\r
break;\r
}\r
- while (seqCanvas.cursorX > av.endRes)\r
+ while (seqCanvas.cursorX > av.colSel.adjustForHiddenColumns(av.endRes))\r
{\r
if (!ap.scrollRight(true))\r
break;\r