Merge branch 'features/JAL-2379pcaMemory' into develop
[jalview.git] / src / jalview / gui / SeqPanel.java
index 0046206..37b4852 100644 (file)
@@ -1590,7 +1590,12 @@ public class SeqPanel extends JPanel implements MouseListener,
     if (stretchGroup == null || !stretchGroup.contains(sequence, res))
     {
       stretchGroup = av.getAlignment().findGroup(sequence, res);
-      av.setSelectionGroup(stretchGroup);
+      if (stretchGroup != null)
+      {
+        // only update the current selection if the popup menu has a group to
+        // focus on
+        av.setSelectionGroup(stretchGroup);
+      }
     }
 
     if (evt.isPopupTrigger()) // Mac: mousePressed
@@ -1640,6 +1645,7 @@ public class SeqPanel extends JPanel implements MouseListener,
         SliderPanel.setPIDSliderSource(ap, av.getResidueShading(),
                 ap.getViewName());
       }
+      // TODO: stretchGroup will always be not null. Is this a merge error ?
       if ((stretchGroup != null) && (stretchGroup.getEndRes() == res))
       {
         // Edit end res position of selected group