X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FSeqPanel.java;h=904e3ceda7d27419da4bb5dc1ca0e008f32fa15d;hb=e10afba2adb890640e5ee9e3b0c086b981c4009b;hp=1de7896a65227c403affa0891b4af42ef1f44d93;hpb=8e1be43e250107a4d86898bd554cf03098fa5957;p=jalview.git diff --git a/src/jalview/appletgui/SeqPanel.java b/src/jalview/appletgui/SeqPanel.java index 1de7896..904e3ce 100644 --- a/src/jalview/appletgui/SeqPanel.java +++ b/src/jalview/appletgui/SeqPanel.java @@ -1423,40 +1423,9 @@ public class SeqPanel extends Panel implements MouseMotionListener, stretchGroup = av.getSelectionGroup(); - if (stretchGroup == null) - { - stretchGroup = av.getAlignment().findGroup(sequence); - if (stretchGroup != null && res > stretchGroup.getStartRes() - && res < stretchGroup.getEndRes()) - { - av.setSelectionGroup(stretchGroup); - } - else - { - stretchGroup = null; - } - } - - else if (!stretchGroup.getSequences(null).contains(sequence) - || stretchGroup.getStartRes() > res - || stretchGroup.getEndRes() < res) + if (stretchGroup == null || !stretchGroup.contains(sequence, res)) { - stretchGroup = null; - - SequenceGroup[] allGroups = av.getAlignment().findAllGroups(sequence); - - if (allGroups != null) - { - for (int i = 0; i < allGroups.length; i++) - { - if (allGroups[i].getStartRes() <= res - && allGroups[i].getEndRes() >= res) - { - stretchGroup = allGroups[i]; - break; - } - } - } + stretchGroup = av.getAlignment().findGroup(sequence, res); av.setSelectionGroup(stretchGroup); } @@ -1512,13 +1481,13 @@ public class SeqPanel extends Panel implements MouseMotionListener, if (av.getConservationSelected()) { - SliderPanel.setConservationSlider(ap, av.getViewportColourScheme(), - "Background"); + SliderPanel.setConservationSlider(ap, av.getResidueShading(), + ap.getViewName()); } if (av.getAbovePIDThreshold()) { - SliderPanel.setPIDSliderSource(ap, av.getViewportColourScheme(), - "Background"); + SliderPanel.setPIDSliderSource(ap, av.getResidueShading(), + ap.getViewName()); } } @@ -1545,7 +1514,7 @@ public class SeqPanel extends Panel implements MouseMotionListener, SliderPanel.setConservationSlider(ap, stretchGroup.cs, stretchGroup.getName()); } - else + if (stretchGroup.cs.getThreshold() > 0) { SliderPanel.setPIDSliderSource(ap, stretchGroup.cs, stretchGroup.getName());