X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fgui%2FSeqPanel.java;h=3bc9bc56f33848ec04e901519cc1d0199fb423fd;hb=e7ed63f1ea56432246a6ed1553f0fe56d26f56ea;hp=3bfc7db208167d24399600f1dc45066af77ad169;hpb=3d2554c478e12c745b1270edd21daeef03de636c;p=jalview.git diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index 3bfc7db..3bc9bc5 100755 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -115,8 +115,7 @@ public class SeqPanel extends JPanel seqEditOccurred = -1; - ap.RefreshPanels(); - repaint(); + ap.repaint(); } @@ -420,14 +419,9 @@ public class SeqPanel extends JPanel stretchGroup = sg; if(av.getConservationSelected()) - Desktop.setConservationSliderSource(ap, av.getGlobalColourScheme(), "Background"); - else if(av.getGlobalColourScheme()!=null && av.getGlobalColourScheme().canThreshold()) - { - ResidueColourScheme rcs = (ResidueColourScheme) av.getGlobalColourScheme(); - int threshold = rcs.getThreshold(); - if (threshold > 0) - Desktop.setPIDSliderSource(ap, av.getGlobalColourScheme(), "Background"); - } + SliderPanel.setConservationSlider(ap, av.getGlobalColourScheme(), "Background"); + if(av.getAbovePIDThreshold()) + SliderPanel.setPIDSliderSource(ap, av.getGlobalColourScheme(), "Background"); } else if( javax.swing.SwingUtilities.isRightMouseButton(evt)) @@ -472,13 +466,9 @@ public class SeqPanel extends JPanel else if(stretchGroup.cs instanceof ConservationColourScheme) { - ConservationColourScheme ccs = (ConservationColourScheme)stretchGroup.cs; - - + ConservationColourScheme ccs = (ConservationColourScheme)stretchGroup.cs; stretchGroup.cs = ccs; - - - Desktop.setConservationSliderSource(ap, stretchGroup.cs, stretchGroup.getName()) ; + SliderPanel.setConservationSlider(ap, stretchGroup.cs, stretchGroup.getName()) ; repaint(); } @@ -487,9 +477,7 @@ public class SeqPanel extends JPanel if(stretchGroup.cs !=null && stretchGroup.cs.canThreshold()) { ResidueColourScheme rcs = (ResidueColourScheme) stretchGroup.cs; - int threshold = rcs.getThreshold(); - if(threshold>0) - Desktop.setPIDSliderSource(ap, stretchGroup.cs, stretchGroup.getName()); + SliderPanel.setPIDSliderSource(ap, stretchGroup.cs, stretchGroup.getName()); } } @@ -511,8 +499,8 @@ public class SeqPanel extends JPanel if(stretchGroup==null) return; - if(res>av.alignment.getWidth()-2) - res = av.alignment.getWidth()-2; + if(res>av.alignment.getWidth()) + res = av.alignment.getWidth()-1; if(stretchGroup.getEndRes()==res)