Merge branch 'releases/Release_2_10_5_Branch' of http://source.jalview.org/git/jalvie...
authorJim Procter <jprocter@issues.jalview.org>
Fri, 31 Aug 2018 11:12:46 +0000 (12:12 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Fri, 31 Aug 2018 11:12:46 +0000 (12:12 +0100)
help/html/releases.html
src/jalview/gui/AppVarna.java

index 2794f80..c566aae 100755 (executable)
@@ -98,7 +98,10 @@ li:before {
           </li>
           <li>
             <!-- JAL-3092 -->Jalview could hang when importing certain types of knotted RNA secondary structure
-          </li>   
+          </li>
+          <li>
+            <!-- JAL-3095 -->Sequence highlight in trimmed VARNA 2D structure is incorrect for sequences that do not start at 1
+          </li>
         </ul>
       </div>
     </td>
index ea16f23..aad4a96 100644 (file)
@@ -120,6 +120,15 @@ public class AppVarna extends JInternalFrame
       }
     }
 
+    /**
+     * highlight a region from start to end (inclusive) on rna
+     * 
+     * @param rna
+     * @param start
+     *          - first base pair index (from 0)
+     * @param end
+     *          - last base pair index (from 0)
+     */
     public void highlightRegion(RNA rna, int start, int end)
     {
       clearLastSelection();
@@ -397,7 +406,8 @@ public class AppVarna extends JInternalFrame
     RnaModel rnaModel = models.get(rna);
     if (rnaModel.seq == sequence)
     {
-      int highlightPos = rnaModel.gapped ? index : position - 1;
+      int highlightPos = rnaModel.gapped ? index
+              : position - sequence.getStart();
       mouseOverHighlighter.highlightRegion(rna, highlightPos, highlightPos);
       vab.updateSelectedRNA(rna);
     }