int start = seq.findIndex(results[1]) - 1;\r
int end = seq.findIndex(results[2]) - 1;\r
\r
- if ( (av.getStartRes() > start) || (av.getEndRes() < end) ||\r
- ( (av.getStartSeq() > results[0]) ||\r
- (av.getEndSeq() < results[0])))\r
+ if(!av.wrapAlignment)\r
{\r
- setScrollValues(start, results[0]);\r
+ if ( (av.getStartRes() > start) || (av.getEndRes() < end) ||\r
+ ( (av.getStartSeq() > results[0]) ||\r
+ (av.getEndSeq() < results[0])))\r
+ {\r
+ setScrollValues(start, results[0]);\r
+ }\r
+ }\r
+ else\r
+ {\r
+ int cwidth = seqPanel.seqCanvas.getWrappedCanvasWidth(seqPanel.seqCanvas.getWidth());\r
+ if( start<av.getStartRes() || start>(av.getStartRes()+cwidth) )\r
+ {\r
+ vscroll.setValue(start / cwidth);\r
+ }\r
}\r
}\r
}\r