X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Futil%2FMapList.java;h=2464264333f021f486c24f32bf9f403c8af1f23d;hb=f7a97ef025c498c19fdcc37d9fc0506d511d18dd;hp=4922267f414af7bcaf71a8f436cbab4680454a64;hpb=d4b01f3adab0fab7774a0cb5e5226cfa44d303fe;p=jalview.git diff --git a/src/jalview/util/MapList.java b/src/jalview/util/MapList.java index 4922267..2464264 100644 --- a/src/jalview/util/MapList.java +++ b/src/jalview/util/MapList.java @@ -417,7 +417,7 @@ public class MapList public int[] locateInFrom(int start, int end) { // inefficient implementation int fromStart[] = shiftTo(start); - int fromEnd[] = shiftTo(end); + int fromEnd[] = shiftTo(end); // needs to be inclusive of end of symbol position if (fromStart==null || fromEnd==null) return null; int iv[] = getIntervals(fromShifts, fromStart, fromEnd,fromRatio); @@ -446,13 +446,13 @@ public class MapList * @param fromStart * @param fromEnd * @param fromRatio2 - * @return + * @return series of from,to intervals from from first position of starting region to final position of ending region inclusive */ private int[] getIntervals(Vector fromShifts2, int[] fromStart, int[] fromEnd, int fromRatio2) { - // correct for word direction for start and end - int startpos = fromStart[0]+fromStart[2]*(fromRatio2-1); - int endpos = fromEnd[0]+fromEnd[2]*(fromRatio2-1); + int startpos,endpos; + startpos = fromStart[0]; // first position in fromStart + endpos = fromEnd[0]+fromEnd[2]*(fromRatio2-1); // last position in fromEnd int intv=0,intvSize= fromShifts2.size(); int iv[],i=0,fs=-1,fe=-1; // containing intervals while (intv